| Author |
javac not found Windows 7 solved
|
Dave Trescott
Greenhorn
Joined: Apr 23, 2011
Posts: 1
|
|
This took me the past four hours to figure out.
java -version worked like a charm every time it was ran.
javac did not work after setting PATH and CLASSPATH
I followed googled/youtoubed? instructions to no avail!
The books and google and you tube instruction overlooked one thing for Windows 7.
You must reboot the computer after setting the Systems Environment for PATH and CLASSPATH.
I did not get why a couple of people requested that you type the PATH command at the prompt. After I unistalled an older jdk and installed a newer one I noticed PATH was not updating.
I referenced Windows 7 Inside Out Microsoft Press and confirmed that you have to reboot for the systems environment variables to take affect. My programs are compiling with joyful errors now.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32694
|
|
Welcome to the Ranch
That is useful information, which I didn't know. Maybe I ought to add that to our FAQ.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32694
|
|
I earlier wrote: . . . Maybe I ought to add that to our FAQ].
Done. Thank you for the information.
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12928
|
|
I'm not sure that it's necessary to completely reboot the computer after adding or changing a system environment variable.
You do have to close and re-open the command prompt window though (not only on Windows 7, but also on Vista and XP), because the command prompt only reads the variables at the moment you open it - it will not pick up changes while it's open.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Renato Bello
Greenhorn
Joined: Jun 20, 2012
Posts: 15
|
|
Jesper de Jong wrote:I'm not sure that it's necessary to completely reboot the computer after adding or changing a system environment variable.
You do have to close and re-open the command prompt window though (not only on Windows 7, but also on Vista and XP), because the command prompt only reads the variables at the moment you open it - it will not pick up changes while it's open.
No need to restart the machine really, just restart the command prompt. Would be interesting to update this information in the faq
|
 |
Gaurangkumar Khalasi
Ranch Hand
Joined: Jun 02, 2012
Posts: 186
|
|
There is no need to reboot/restart the PC after the change in PATH or CLASSPATH system environments.
I am also using Windows 7 and i am changing them many times for JavaSE6 or JavaSE7...
I never restart my PC, but obviously restart the command prompt....
|
 |
 |
|
|
subject: javac not found Windows 7 solved
|
|
|