File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Either NetBeans or jdk1.4 installer copies java.exe to your system32 directory

 
Rob Ross
Bartender
Posts: 2205
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a new behavior for a java installer, and caused me 2 hours of
debugging time. I develop an app on jdk1.3.1_02, and just recently installed
the 1.4 sdk, and even though my PATH still referred to the jdk1.3.1_02\bin
directory, because the .exe were in the system32 folder, they were getting
used first. No matter what I did to my env variables, calling java -version
always returned the 1.4.0 version.
Does this seem ok to everyone? I prefer to keep all the java executables in
their jdk directory so I can switch between versions via a command-line
batch script.
Or is there a good reason for copying these files?
I also just installed NetBeans and selected the 1.4 version for it. Could
that have been what copied those files over?
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Rob.
i installed 1.4 and it didnt copy the java.exe to the system32 directory.
maybe it is because of the netbeans.....
however did u uninstall 1.3 before installing 1.4??
i think that if u install 1.4 beore uninstalling 1.3 then something similar like u told has happened to some of my students. i told them to just reinstall 1.4 to fix it and it did.
 
Rob Ross
Bartender
Posts: 2205
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I need both jdks because I am developing on both platforms at the moment. I just create batch scripts that set up my environment variables so I use the right jdk tools to compile and run an app. The thing that was screwing me up was that *something* copied the java.exe from 1.4 into the system32 folder. That folder is the first thing in the PATH, so of course that was being used, even when later I had included my jdk1.3.1\bin in the PATH.
Someone on com.lang.java.programmer just informed me that the jdk installer *always* copies the current version into that folder, although I have never noticed that before...mainly because I've never tried doing dual-version development.
Thanks for the info though!
 
John Dale
Ranch Hand
Posts: 399
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recall the Java installer has given me a chance to indicate whether or not I wanted to install as the "system JVM", which involves copying a stub java commmand to the Windows directory and some registry entries. I don't remember whether my last install asked this.
 
Rob Ross
Bartender
Posts: 2205
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The last two times I've installed a JDK the only question I recall being asked is where I wanted to install the jdk directory and what I wanted to name it.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic