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

27th Mar 2017, 4:27 PM
Ryder Vannelli
2 Answers
0
compile ->> javac ExampleProgram.java run ->> java ExampleProgram input input=command line argument
27th Mar 2017, 4:44 PM
Sriyan Fernando
Sriyan Fernando - avatar
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
27th Mar 2017, 4:51 PM
Alex Snaidars
Alex Snaidars - avatar