Forums Register Login

Why JDK installation does not adjust path?

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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.

 
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
I think that only Sun Microsystems knows the answer to "why".
+Pie Number of slices to send: Send
Well, thanks. They are a little bit strange there, too occupied in plots against MS.
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 980 times.
Similar Threads
javac not making a .class file
Cannot run program from another directory other than c:\Sun\SDK\jdk\bin
Difference among JAVA_HOME,JRE_HOME,CLASSPATH and PATH
javac not finding source files
How to check classpath, installed by JDK, in Windows XP?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:25:08.