File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Either NetBeans or jdk1.4 installer copies java.exe to your system32 directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Either NetBeans or jdk1.4 installer copies java.exe to your system32 directory" Watch "Either NetBeans or jdk1.4 installer copies java.exe to your system32 directory" New topic
Author

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

Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
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?


Rob
SCJP 1.4
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
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

Joined: Jan 07, 2002
Posts: 2205
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

Joined: Feb 22, 2001
Posts: 399
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

Joined: Jan 07, 2002
Posts: 2205
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
 
subject: Either NetBeans or jdk1.4 installer copies java.exe to your system32 directory
 
Similar Threads
Problem with JDK at command prompt
How can we change tha java version to use?
Help needed with Java EE SDK 6 installation on Windows XP
installed j2ee,but cant see the splash screen of an application deployment tool
Use different JDK versions