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 Why JDK installation does not adjust path? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Why JDK installation does not adjust path?" Watch "Why JDK installation does not adjust path?" New topic
Author

Why JDK installation does not adjust path?

Guennadiy VANIN
Ranch Hand

Joined: Aug 30, 2001
Posts: 898
I am new to using java from command line and to deployment java applications, since I was using JBuilder for years.
I was surprised that on installation of JDK, java works, but javac and jar do not. It is necessary to manually add bin-subdirectory to path.
Why it is not done by installation?
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
You would have to ask Sun that question. But they told you all about it in the Installation Notes
Updating the PATH Variable
You can run the Java 2 Runtime Environment without setting the PATH variable, or you can optionally set it as a convenience.
Should I set the PATH variable?
Set the PATH variable if you want to be able to conveniently run the Java 2 Runtime Environment executables from any directory without having to type the full path of the command. If you don't set the PATH variable, you need to specify the full path to the executable every time you run it, such as:
C:> \j2re1.4.1\bin\java MyClass.java
It's useful to set the PATH permanently so it will persist after rebooting.
How do I set the PATH permanently?
To set the PATH permanently, add the full path of the j2re1.4.1\bin directory to the PATH variable. Typically this full path looks something like C:\j2re1.4.1\bin.
To set the PATH permanently, from the start menu, open the Control Panel, and from there, double click the System icon to open the System Control panel. If the System icon is not visible, first click on the "Switch to Classic View" button.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Guennadiy VANIN
Ranch Hand

Joined: Aug 30, 2001
Posts: 898
Thank you, Cindy,
it seems to me I have not finished Sun's reading but I am wasting almost all my free time to complete it
Guennadiy VANIN
Ranch Hand

Joined: Aug 30, 2001
Posts: 898
Cindy,
you refer abt necessity to modify path to JRE's java.exe.
But, strange enough/again, it does run without necessity to intervene, it is JDK's javac.exe and jar.exe that do not run.
Why such a discrimination?
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9053
    
  12
I think that only Sun Microsystems knows the answer to "why".


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Guennadiy VANIN
Ranch Hand

Joined: Aug 30, 2001
Posts: 898
Well, thanks. They are a little bit strange there, too occupied in plots against MS.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why JDK installation does not adjust path?