Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

PATH environment variable set to correct JRE path but still receiving "'javac' not recognized"  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've searched this forum and have performed the necessary update to the PATH (system) environment variable but still receiving the "'javac' is not recognized as an internal or external command". I've even attempted to create and since removed the "JAVA_HOME" and "CLASSPATH" variables out of curiosity.

I should note: I do have Eclipse and I'm able to use Java with it. However, I would like to learn Java using the "HEAD FIRST JAVA". That is why I'm trying to do this.

Thanks!
 
author & internet detective
Marshal
Posts: 38504
653
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scott,
Welcome to CodeRanch!

Are you using Windows, Mac or Linux? Can you run echo $PATH if on Mac/Linux or echo %PATH% if on Windows and post the result?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 38504
653
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, remember to close/reopen the DOS/PowerShell prompt if using Windows. That's necessary to get variable changes like this to take effect.
 
Sheriff
Posts: 5023
138
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:or echo %PATH% if on Windows...

You can actually just type PATH and get what you need (in Windows only).
 
Knute Snortum
Sheriff
Posts: 5023
138
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@OP, this may help you set up your system.  It has a lot of information, but you should be able to find what you need.
 
Master Rancher
Posts: 3257
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

PATH environment variable set to correct JRE path


The javac.exe file is part of the JDK, not the JRE. 

Can you copy the contents of the PATH variable and paste it here?
 
Marshal
Posts: 59728
187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . and welcome to the Ranch
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Scott!

One day I had the same problem, when I worked with different versions of JDK

It's because on the installation (I don't remember form what version exactly) change the environment variable "PATH", look the environment variable and find if you have something like a "C:\ProgramData\Oracle\Java\javapath" (if you used Windows).

If you see this value, remove it and check the value of PATH and JAVA_HOME again, reboot and try again.

The javac.exe file is part of the JDK, not the JRE.



that's very important, make sure you have installed a JDK not JRE

best regards.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!