This week's book giveaway is in the Testing forum.
We're giving away four copies of Practical Unit Testing with TestNG and Mockito and have Tomek Kaczanowski on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes javac not found Windows 7 solved Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "javac not found Windows 7 solved" Watch "javac not found Windows 7 solved" New topic
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: 26641
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: 26641
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: 11634

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
 
 
subject: javac not found Windows 7 solved
 
Threads others viewed
Problem starting eclipse
Source File declaration rule in java
Afraid of the next step.......
classpath/ Assertions
Really basic question!
IntelliJ Java IDE