English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

package world;
public class HelloWorld{}

I declare world directory in c:\
when I want to compile it
set CLASSPATH=.;c:\;
c:>world>javac HelloWorld.java

I will this error:
'javac' is not recognized as an internal or external command,operable program or batch file.

2007-07-12 08:38:47 · 4 answers · asked by ensiyeh r 1 in Computers & Internet Programming & Design

And javac is installed on my computer... I have java5 and CLASSPATH environmental variable is set to full absolute address of bin folder.....but still I have that problem
and one more my bin folder is located in d:/jdk/bin...please help me:(

2007-07-12 17:34:24 · update #1

4 answers

The error you're getting sounds like a Windows/DOS error that the executable can't be found.

Make _sure_ that your Windows and/or DOS path environment variable includes the path to your java bin directory.

There's a couple ways to do that. The most direct is to open a command prompt and type "path" and hit enter. Verify that "d:/jdk/bin" is there.

You can also enter "set" from the commandline and see all your environment variables. "Path" is one of those listed.

You can also look at the properties of "my computer" and look at the "advanced" page.

If the path to your java executable isn't in your path, then you'll get the error that you've been seeing. Add it to your path, and your system will know where it is and be able to call it.

2007-07-15 23:31:38 · answer #1 · answered by Kevin 7 · 6 0

First make sure you have JDK installed.

One way is to search for javac.exe

Usually it will be within a folder named BIN which in turn be within the JDK folder.

Make sure the CLASSPATH environmental variable is set to this address of the BIN folder (the full absolute address).

To do this select the Properties of My Computer, then under Advanced Tab click Environment Variable.

If CLASSPATH is not present click either of the two New button to add the CLASSPATH variable.

For variable name type CLASSPATH
For variable value type the

2007-07-12 16:13:12 · answer #2 · answered by aRe_yeS 2 · 0 0

it means that either the java compiler is not installed on the machine, or that its installed but it is not located in any of the directories that you PATH variable includes.

2007-07-12 16:09:18 · answer #3 · answered by timneilson 2 · 0 0

it means that javac isnt installed on your computer... you need to install it or some other form of a java compiler...

2007-07-12 15:41:38 · answer #4 · answered by rubyxc7 2 · 0 0

fedest.com, questions and answers