Running a Java Program | Sololearn: Learn to code for FREE!

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

27th Mar 2017, 4:27 PM
Ryder Vannelli
2 Answers
compile ->> javac run ->> java ExampleProgram input input=command line argument
27th Mar 2017, 4:44 PM
Sriyan Fernando
Sriyan Fernando - avatar
the command: cd [directory where is the java file] for example cd c:\java then javac java ExampleProgram Name of the class must be also ExampleProgram
27th Mar 2017, 4:51 PM
Alex Snaidars
Alex Snaidars - avatar