After the newly-learned Java is configured with the JDK, it is an error to run the first Java program with the cmd command as an example. That is true:
1, in a certain disk (preferably English path), new Notepad input Java program, for example:
Save As Hellojava.java. 2. Computer Start-run (or win+r) input cmd, enter, open the program location. Enter Javac Hellojava.java. If something goes wrong,
3. This is because even if saved in. java format, it is also a. txt format, at this point: click on Computer (My Computer)-upper left corner Click Organization-View, advanced settings-unhide the file suffix name. then just the Notepad program, the. txt suffix appears, delete the suffix name, the program becomes. java suffix.
4. Javac Hellojava.java return again, enter Java Hellojava the second line
The problem is solved.
Java First Program (CMD environment)