新手入门经典:Jsp环境配置_MySQL
时间:2021-07-01 10:21:17
帮助过:36人阅读
第一部分 JAVA环境安装
1.目前J2SDK的最新版本是1.4.2_01,下载地址:http://java.sun.com/j2se/1.4.2/download.html
Download NetBeans IDE v 3.5.1 with J2SE v 1.4.2 COBUNDLE
采用包含了J2SE v 1.4.2的NetBeans IDE v 3.5.1
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L2Z95015439.jpg)
2. 安装!我的每一步:
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L291M024D1.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L292550323b.jpg)
3. 目录注意改下。“安装路径不宜有空格”!因为有时很难区分“Program Files”是代表一个文件夹还是代表“Program”和“Files”两个东西
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L2959604bN.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L29BP5aR.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L2a4P64M6.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L300Y0I610.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L30160RY0.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L302410c5A.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L305Q0103412.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L30924011N14.jpg)
4. 配置环境变量
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L312C012W31.jpg)
5. 新建系统变量
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L31921013K11.jpg)
6. 建第一个系统变量:JAVA_HOME 值:C:\j2sdk_nb\j2sdk1.4.2
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L320010142340.jpg)
7. 建第二个系统变量:CLASSPATH 值:.;%JAVA_HOME%\lib
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L320Q015W16.jpg)
8. 注意!是修改,不是新建。
系统变量:PATH 的新值是在原有值前加上%JAVA_HOME%\in;
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L3216201A940.jpg)
9. 测试j2sdk的安装与环境变量设置是否正确
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L3253501M964.jpg)
所以显示完全和新建的吻合。OK!
接着就可以用一个.java来编译为class来执行了。
第二部分 TOMCATv5.0.16安装
1,下载最新的TOMCATv5.0.16
http://www.apache.org/dist/jakarta/tomcat-5/v5.0.16/bin/
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L32U601R941.jpg)
2. 安装TOMCATv5.0.16
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L3323Z193W2.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L3331Z20U28.jpg)
选择Custom
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L336410212017.jpg)
3. 路径自己设定一下
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L33H20223F5.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L33P20232036.jpg)
4. 该处的JVM是自动查找的,如果您出现“No Java Virtual machine Found” 也就是找不到Java虚拟机。
说明您的系统变量还没有设定,有关系统变量的设定在
http://www.cnbruce.com/blog/showlog.asp?cat_id=26&log_id=295
“JAVA环境安装”已做解释
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L34MP24CO.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L34UP254X7.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L3493Z263922.jpg)
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L3532102L3V.jpg)
5. 运行tomcat目录里binstartup.bat。启动tomcat.
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L3595402S031.jpg)
6. 假如有个dos窗口停留着没关闭,并有一些运行成功tomcat和初始化信息,证明tomcat运行成功。
![](http://img.bitscn.com/upimg/mysql/20070122/11E4L3603502924O.jpg)
7. 在浏览器地址栏输入 http://localhost:8080
可爱的大猫出现,至此,JSP的运行环境设定完毕!