0
Running a Java Program
Im a bit lost on getting to the directory using command prompt i have the default notepad up and used that for writing the command on my computer any help? I saved the note as it said ExampleProgram.java
2 Answers
0
compile ->> javac ExampleProgram.java
run ->> java ExampleProgram input
input=command line argument
0
the command:
cd [directory where is the java file]
for example
cd c:\java
then
javac ExampleProgram.java
java ExampleProgram
Name of the class must be also ExampleProgram