This week's giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Production-Ready Serverless (Operational Best Practices) and have Yan Cui on-line!
See this thread for details.
Win a copy of Production-Ready Serverless (Operational Best Practices) this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

javac not found Windows 7 solved  RSS feed

 
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.
 
Marshal
Posts: 63784
209
  • 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
Marshal
Posts: 63784
209
  • 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.
 
Java Cowboy
Posts: 16084
88
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.
 
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
 
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....
 
rubbery bacon. crispy tiny ad:
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!