Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why JDK installation does not adjust path?

 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9064
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that only Sun Microsystems knows the answer to "why".
 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, thanks. They are a little bit strange there, too occupied in plots against MS.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic