Java environment Installation

Source: Internet
Author: User

Install and configure j2sdk:

Run the j2sdk installer and install it according to the default settings. You can also customize the path, but you need to modify the following configuration.

Configure j2sdk:

Configure environment variables:

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

Java_home = C:/program files/Java/jdk1.5.0 _ 04

Classpath = % java_home %/lib/dt. jar;

% Java_home %/lib/tools. jar;

Path = % java_home %/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

 

 

 

How do I configure system variables for JDK and tomcat environment variables?

 

 

Java_home: C:/program files/Java/jdk1.6.0

Path: C:/program files/Java/jdk1.6.0/bin

 
Classpath:.; C:/program files/Java/jdk1.6.0/lib/dt. jar; C:/program files/Java/jdk1.6.0/lib/tools. jar;

Tomcat_home: C:/program files/Apache Software Foundation/tomcat 6.0

Catalinda_home: C:/program files/Apache Software Foundation/tomcat 6.0

You can create these variables in your user environment variables. As long as you enter the user who sets the environment variable when starting the instance.

It can also be written in system environment variables. It is valid for all users. However, because path is an existing system environment variable, You need to edit it (instead of creating a new one). First, write a semicolon to separate it, and then put C: /program files/Java/jdk1.6.0/bin fill in the path. You can create other environment variables.

 

References:

Http://hi.baidu.com/qinxiaoli0309/blog/item/bebc3fd8a689f8ef38012f75.html

Http://topic.csdn.net/t/20030613/15/1912134.html

Http://www123me.blog.163.com/blog/static/127953327201022133829962 .... Good

Bytes .... Good Graphic references

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.