I am typing my program under JCreator LE which is in C:\Program Files\JCreatorV3LE\MyProjects
1.My java is in c directory
Have project folders as follows:
2.When I type in MS-DOS
Directory of C:\java
Dates <DIR> .
Date <DIR> . .
A new classpath set up under System properties > environment variables> system variables as
3.Trying to compile programs in MS-Dos
> I assume this converts it to a class file.
> but I keep getting �java\projects� is not recognizes as an internal or external command, operable program or batch file
4.In MS-Dos when I type c:\ javac Welcome1.java
States error : error cannot read : Welcome1.java
5.when I type just c:\java
I get an usage output of
Usage: java [-options] class [args�]
<to execute a class>
or java java [-options] �jar jarfile [args�]
<to execute a jar file>
6.when I type c:\javac
I get usage output of
Usage: javac <options> <source files>
>I would like to know if my classpath is correct. What should I type in MS-Dos to compile the program?
Originally posted by Rim Cha:
I assume this converts it to a class file.
but I keep getting �java\projects� is not recognizes as an internal or external command, operable program or batch file
Is 'c:\java\projects>' the DOS prompt or are you actually typing that ? The error message suggests the latter which is wrong. All you need to type is
Firts you need to know where is Welcome1.java located. If it is in C:\java\projects then the commands are
If class Welcome1 uses other classes, you may get compiler errors without specifiyng classpath.
[ August 18, 2006: Message edited by: Vlado Zajac ]
You should add the bin directory of the JDK to the PATH environment variable. The installation notes explain how to do that for different versions of Windows (see step 5 of the instructions).
After you did that, follow this tutorial to the letter to compile and run your first Java program: Hello World Tutorial
(Note, the tutorial says you need JDK 6, but it works exactly the same with JDK 5 and other older versions).