0
Need help in this step!
Instructions ----------------------- Open a command prompt window and go to the directory in which you saved the file. We'll say that it's C:\sololearn. To compile your code, type javac ExampleProgram.java, and press Enter. If there are no errors in your code, the command prompt will take you to the next line and generate a bytecode file, ExampleProgram.class. ------------------------------------------ Completely new to this world and java assume I know how to open a file through command prompt. Ive google it and no help. Please help. Thank you.
2 Answers
+ 1
Did you cant open .class?If yes Try "cd.. & cd.." (until show "C:\") then "cd sololearn" and then..."java Example"
0
To open the command prompt (cmd) :
-Start menu
-Type cmd
-Choose comand prompt
Simply to open the folder (directory) that contains the java code in cmd you can type "cd" then space then drag the folder into the cmd window and drop it then press enter.
Now you can type javac then space then the FileName.java to compile it.
Instead of the the last two steps you can directly type javac then space then drag the file you want to compile to the command prompt window and drop it then press enter