This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
When I install jdk, it automatically installs "c:\ program Files\java\jre6\bin\java"
Now I am setting environment variable Path with the value of "C:\program files\java\jre6\bin\java"
If I am setting path variable like this, do I still need to set up JAVA_HOME variable ? or if I am setting up JAVA_HOME variable as an environment variable, do I need to set up Path variable for java bin file ?
Do I setup path variable for java compiler (javac) or java executable (java) ? I was tyrying to look for javac in "c:\ program Files\java\jre6\lib\bin" , but I could not find bin folder within lib folder. javac is not within lib folder either. So where is javac located ?
It never goes into that folder when I install it on Windows. While we are at it, please read this FAQ because you have given two different locations. I suspect, if you are installing into a jre folder, that you have downloaded the wrong thing. Remember you need a JDK, not a JRE, to create Java™ programs.
Joined: Apr 23, 2009
I just did fresh installation for java and its installed in following dir
exe file is located in the following location
1) This installation did not install jdk, it only installed jre1.6. Why does it not install jdk ? I did not see any option to install jdk or jre, there was only one option available.Before, there were options to install jdk or jre. Does it mean that we dont need jdk anymore ? If its required, how to install it ?
2) Where is javac located ?
3) if I have to specify JAVA_HOME, it will be JAVA_HOME=C:\Users\Jignesh\AppData\LocalLow\Sun\Java\jdk1.6.0_20. What is the need of specifying JAVA_HOME, if I am already specifying PATH and CLASSPATH ? If its not specified, does it give any issues ? Or is it only for the reference purpose ?
That's not the default install folder. If you customize the folder during installation, you'd better know exactly what you're doing or you'll end up with a JRE install that overwrites the JDK install -- and no javac.exe.
There are no new questions, but there may be new answers.
Joined: Oct 13, 2005
As Darryl Burke suggests, you have installed your JDK in an unusual location. You should add that location to your system PATH, before any other Java™ locations. This FAQ reminds you how to set your system PATH.
Joined: Oct 13, 2005
nirjari patel wrote:. . . Why does it not install jdk ? . . .
Did you download a JDK installer? Look here, and make sure to download a JDK.
Have you set your PATH to include that directory?
Specifying JAVA_HOME makes it easier to update PATH entries; see the FAQ I posted earlier.