For beginners of Java, setting environment variables is a major concern. Many of them are not familiar with this. Here I will share with you how to set environment variables for beginners.
"My Computer (right-click) ----> properties -----> advanced ------ environment variables"
You can see the logon user variables you are using at the top, and the following is the configured system environment variables. Generally, we can set the variables above.
Create a variable name java_home variable value C:/program files/Java/jdk1.5.0 (that is, the path of your installed Java main directory)
Then create the class_path variable value./; % java_home %/lib/tools. jar; (Note the starting part and ending part of the special mark)
Create the PATH variable value % java_home %/bin; % java_home %/LIB;
The following variables will be used for some time:
In JDBC (database) Ant JUnit, JSP is ready. I wrote my own paths below:
Ant_home C:/program files/Apache-ant-1.7.0
Catalina_home C:/program files/Apache Software Foundation/tomcat 6.0
CLASSPATH. /; % JAVA_HOME %/lib/tools. jar; E: // C:/Program Files/mysql-connector-java-5.0.6/mysql-connector-java-5.0.6-bin.jar; C:/Program Files/junit4.3.1/junit-4.3.1.jar; C:/Program Files/junit4.3.1
JAVA_HOME C:/Program Files/Java/jdk1.5.0
PATH % JAVA_HOME %/bin; % JAVA_HOME %/lib; % ANT_HOME %/bin; % ANT_HOME %/lib; % PATH %;
I use it on my computer. Please rest assured !!!