I have changed the Path Environment Variable for Windows Command Prompt to:

C:\j2sdk1.4.2_04\bin

so why, when I try to run javac while in the code folder directory, do I still get the error message

"javac is not recognized as an internal..."

I was forced to put the path info in at the command prompt before the .java file would compile.

Help.

Dani AI

Generated

A compact troubleshooting summary for the “javac is not recognized” symptom (seen in ’s original post):

Most likely causes seen in this thread: the JDK’s bin folder wasn’t the actual item added to the system PATH, the change used the wrong slash style, the change was made only for the current command window (or only to a user variable), or only a JRE (which doesn’t include javac) was installed. ’s suggestion to check System Properties was right; ’s note about the installer location and ’s reminder about semicolon separators are both useful. ’s use of set explains why the OP had to re-enter the path at the prompt — set is temporary.

Quick checks (run in a new Command Prompt window):

echo %PATH%
where javac
javac -version

If where javac finds nothing, open Explorer and confirm a javac.exe exists inside the JDK’s bin directory (not the JRE). If the JDK is under a path with spaces, avoid surrounding the PATH entry with quotes (Windows treats quotes as part of the entry); instead add the folder unquoted and separate entries with ;.

Permanent fix notes:

  • Use System → Advanced → Environment Variables to add the JDK’s bin to the System Path (or edit the user Path if appropriate).
  • If a command-line set was used earlier, it only affected that shell; open a new cmd after making GUI changes.
  • Do not accidentally overwrite the existing PATH—append the new entry, don’t replace everything (keep entries like C:\Windows\System32).

Extra tips: prefer backslashes (\) in Windows paths, check for simple typos (for example misspellings of “Program Files”), and ensure admin rights when changing the system PATH. The thread shows the problem is usually environmental, not a compiler bug; once the correct JDK bin is on the persistent PATH and a new CMD is opened, javac should be available.

Recommended Answers

All 11 Replies

Greetings.
Errr, do you mean that you have set the path in the System Properties?
With Variable: Path
and Value: c:/j2sdk1.4.2_04/bin ?

yes, thats what I mean, with the slashes as I have written them

help with the path for servlets

well i got my path working in any case

First try to locate te bin folder from the windows explorer, and then copy the path to ur environment variable, which you can get by right clicking on My Computer Icon and then to Advanced Tab and then to Environment Variable...
But i think if you install the jre or jdk for jsdk it by default reallocates ur path to c:\\Program Files\Java\j2sdk1.4.2_04\bin

check this out...

Regards...

I have changed the Path Environment Variable for Windows Command Prompt to:

C:\j2sdk1.4.2_04\bin

so why, when I try to run javac while in the code folder directory, do I still get the error message

"javac is not recognized as an internal..."

I was forced to put the path info in at the command prompt before the .java file would compile.

Help.

help with the path for servlets

I'm runnning Tomcat Appache 5.5.15 wth JAVA 1.5.06. To get servlets run on my laptop I only copied and past servlet-api.jar & jsp-api.jar into following directory

C:\Program Files\Java\jdk1.5.0_06\jre\lib\ext

which is where java is installed

you can find this jar files in tomcat as follow

C:\Tomcat 5.5\common\lib

and to setting path for java, don't forget put on end of path semicolum " ; " or some pc refuse to work with java

hi....im working with tomcat... to run servlets....i cant execute the javac command in dos ....what do i do??? java is installed...i even gave the path to where its installed...i even changed yhe system properties... but it says javac is not recognised as internal and external command...

Start your own thread, but that "error" is always that the path is not set (not classpath, path).

Just go at command prompt and check whether ur jdk is in programme files, if it is programe
file then set path
c:\set path=C:\programe files\j2sdk1.4.2_04\bin;%path%;
or if not in prog files then
c:\set path=C:\j2sdk1.4.2_04\bin;%path%;

how to set path? after typng the program is not getting executed. it is showing tat javac is not recognized so please tell wat to do

how to set path? after typng the program is not getting executed. it is showing tat javac is not recognized so please tell wat to do

First post here explain how to install Java and how to set PATH

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.