Busy all day, and finally by their own little foolish, but also learn a lot, know how to solve problems.
The problem is that when I compile my first applet HelloWorld in the CMD run environment, the JAVAC command can run, but the following occurs after the Java command.
In the experience of the Baidu Blog Park all kinds of search is not the case, finally asked the roommate finally found that the original is my program written wrong. At run time, it should be Java HelloWorld, no suffix. This also shows that I learn how not serious, of course, with the body uncomfortable restless (I am not a girl) also has a relationship, next time will be well mastered.
To get down to the chase, let me briefly describe the process of configuring environment variables.
First of all, my JDK is installed in C:\Program files\java\jdk1.8.0_60; Right click on Computer-Properties-Advanced system settings-environment variables,
Then we start setting up the variables. The first is to set the java_home, note that if you do not have to create a new one, as shown below.
The value of the variable under Java_home is written like this: C:\Program files\java\jdk1.8.0_60.
Is the directory that your JDK installs.
Then set the path variable, ".; %java_home%\bin; "," "in the content, a punctuation not less." The meaning is in the bin directory under Java_home.
Finally, Classpath: ".; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; ".
This is probably the case, in fact, it is very simple, no online said so complicated.
"Song Hongkang Learning Diary 1" Questions about environment variable settings--cannot find or load main class Java