Setting Java JDK environment variables in Winxp

Source: Internet
Author: User

Setting Java JDK environment variables in Winxp

: JDK 6.0 Java Development Kit Development environment package

Install and configure j2sdk:

Run the j2sdk installation program and customize the path. My installation path is: C: \ j2sdk1.4.2 _ 04

Configure j2sdk: Configure environment variables:

Choose my computer> Properties> advanced> environment variables> system variables to add the following environment variables:

JAVA_HOME = C: \ j2sdk1.4.2 _ 04
CLASSPATH =.; C: \ j2sdk1.4.2 _ 04 \ lib \ tools. jar; C: \ j2sdk1.4.2 _ 04 \ lib \ dt. jar; C: \ j2sdk1.4.2 _ 04 \ bin;
Path = C: \ j2sdk1.4.2 _ 04 \ bin;

Write a simple java program to test whether J2SDK has been installed successfully:

Public class hello
{
Public static void main (String args [])
{
System. out. println ("Hello ");
}
}

Save the program as a file named hello. java.

Open the Command Prompt window, go to the directory where hello. java is located, and type the following command

Javac hello. java
Java hello

If "hello" is printed, the installation is successful. If "hello" is not printed, check whether the preceding configuration is correct.

Note that "Hide extensions of known file types" is not checked in the system folder option (my computer> Tools> View)

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.