Every person who comes into contact with the JSP server basically starts from the installation of JSP, because JSP does not have any installation process like ASP, nor does it have an automatic installation package like PHP, JSP installation is troublesome, and there are many manual steps. Here we will explain them step by step:
First, you must download several software: JDK, Apache, and Tomcat. JDK (Java Development Kit) is the basis of all java applications. It can be said that all java applications are built on this. It is a set of APIs, or java Class. I learned that the latest version of JSP was JDK1.X. Later, SUN (the development company of SUN Microelectronics and JAVA) suggested using J2RE. Currently, many people use J2EE.
I believe everyone has heard that JAVA is very portable and can be applied to various system platforms. Therefore, many enterprises have built JSP on LINUX for cost or security considerations, some veteran technicians believe that LINUX + TOMCAT + APACHE is a perfect WEB platform, however, I think we should also consider that there are not many developers working in LINUX and the development is more difficult than the WINDOWS platform, and the development efficiency is greatly limited, therefore, the cost for building the WEB on the LINUX platform is also very high in terms of development and maintenance in the future, so I will talk about how to install JSP in WIN2000.
I. JDK (or J2EE) installation
Download JDK
You can go to SUN's official website to download JDK or J2EE. The usage is similar. Here we take JDK as an example to explain: java.sun.com, there are many places in China.
Run the. Exe file in windows and install it in a directory, such as C: jdk.
Configuration System
Select "My Computer" on the desktop, right-click "Advanced" and choose "environment variable,
Click "new" in "system variables"
Enter CLASSPATH in the variable name, and enter the following in the variable value:
C: JDKLIBdt. JAR; C: JDKLIBTOOLS. JAR; C: JDKBIN
After the configuration is complete, restart the computer and the environment variables will take effect.
Test
(1) use a text editor to write a simple java program:
Public class HelloWorld {
Public static void main (String args []) {
System. out. println ("Hello World! ");
}
}
This example is the famous "Hello World". Its function is to display "Hello World ".
Note: the file name must be "HelloWorld. java", which is case sensitive.
(2) compile: execute at the doscommand prompt: (case sensitive)
Javac HelloWorld. java
If normal, the HelloWorld. class file will be generated.
(3) run: run the command at the doscommand prompt: (case sensitive)
Java HelloWorld
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.