JSP environment variables and configurations

Source: Internet
Author: User

1> JDK installation and configuration

First of all, of course, download the relevant software (I use JDK (file name for java_ee_sdk-5-windows (j2sdk 52.16.rar ))

Ii. Installation

Find the java_ee_sdk-5-windows (j2sdk 52.16.exe) from the extracted file and click Install directly. Remember the installation directory (for example, c: \ Program Files \ Java \ jdk1.5.0 _ 11)

Iii. Environment Settings

Right-click my computer and choose Properties> advanced> environment variables.

Create a java_home system variable value for your JDK installation directory (for example, D: \ Program Files \ j2ee_sdk5)

New classpath variable value: % java_home % \ DT. jar;. \; % java_home % \ Lib \ tools. Jar (My JDK installation directory)

Note the value of the classpath variable. This point must not be small or an error will be reported. The following will explain why the error is reported.

Modify the PATH variable and add % java_home % \ bin to this variable. This is my JDK installation directory)

Now the environment settings are complete. Let's test whether the settings are correct.

First, prepare an example.ProgramThe output of helloworld in the classic example is used as an example.

Create a new helloworld. Java and write the following content:

Class helloworld {
Public static void main (string [] ARGs ){
System. Out. println ("Hello world! ");

Save the file as needed.

Run: Start-> Run-> cmd

Switch the directory to your helloworld. Java

Input: javac helloworld. Java

Input: Java helloworld

Generally, the first command is successfully executed. If the second command is unsuccessful, the following information may appear:

1. If exception in thread "Main" Java. Lang. noclassdeffounderror: helloworld
That is, you didn't add that. (DOT) to the environment variable)

2. If exception in thread "Main" Java. Lang. nosuchmethoderror: Main
Or helloworld. Java: 1: Public class helloworld must be defined in a file called

"Helloworld. Java ".

That is, you did not write this helloworld case-insensitive, or you did not save it as helloworld. java. This name must be the same as the public class name.

Check whether your environment settings are correct. If you modify the environment settings, remember to re-open the new command window. Otherwise, you will not be able to see the modification effect, it is like caching your original settings in the Command window.

2> tomcat installation and configuration

1. Download The jakarta-tomcat-5.0.28, which is free of installation download and decompress, put the decompressed file in the directory of your desired path, such as my put in: C: \ Program Files \ tomcat-5.0.28

2. Configure Environment Variables

Create a system variable: tomcat_home = c: \ Program Files \ tomcat-5.0.28

Modify the PATH variable. The modified path is: Path = c: \ Program Files \ Java \ jdk1.5.0 _ 11 \ bin; C: \ Program Files \ tomcat-5.0.28 \ bin

Iii. Test

After the above configuration, we can check whether our configuration is effective.

Go to c: \ Program Files \ tomcat-5.0.28 to start startup. BAT to start Tomcat. After the startup, enter http: // localhost: 8080 in the address bar of the browser. If you see a cat in front of you, congratulations on your configuration.

3> install ide software such as myeclipse

Original article: http://apps.hi.baidu.com/share/detail/21396135

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.