JS 5. Configuration of the basic environment
Many beginners in the configuration of the basic JDK environment encountered some problems, here to configure the basic environment of the method, if there is any incomplete, welcome to add.
General need to configure three variables
Java_home
PATH
CLASSPATH
Configuring path allows you to run Javac,java directly at the command prompt, and if you cannot run the Javac,java prompt at the command prompt without this command, your path is not configured properly. If you're running your Java class and you're prompted to not find the main function, your classpath is not configured properly. The detailed configuration method is as follows:
To set the run environment parameters:
A. If it is win95/98, add the following 3 line statements at the end of \autoexec.bat:
B. If it is Win2000, use the mouse to right-click the "My Computer"-> Properties-> advanced-> Environment variables
System variable-> new-> variable name: Java_home variable Value: c:\j2sdk1.4.1
System variable-> new-> variable name: CLASSPATH variable value:.; %java_home%\lib
System variable-> edit-> variable name: Path at the front of the variable value plus:%java_home%\bin;
(There is an English period in the Classpath "." followed by a semicolon indicating the meaning of the current path)
In classpath you can directly specify a package name, such as a third party package that you use. Multiple packages are separated by semicolons.
C. If it is WinXP, the method is similar to Win2000
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.