• Post Reply Bookmark Topic Watch Topic
  • New Topic

javac not found Windows 7 solved  RSS feed

 
Dave Trescott
Greenhorn
Posts: 1
Chrome Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 53622
127
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 53622
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I earlier wrote: . . . Maybe I ought to add that to our FAQ].
Done. Thank you for the information.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15827
77
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Renato Bello
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!