JDK, TOMCAT,mysql设置:
java设置:
-JDK:
JAVA_HOME: D:\Program Files\Java\jdk1.7.0_45
-CLASSPATH
.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
-path:
;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;
最后用javac验证
TOMCAT配置:
CATALINA_HOME: D:\apache-tomcat-7.0.57
CATALINA_BASE:D:\apache-tomcat-7.0.57
----CLASSPATH:
%CATALINA_HOME%\lib\servlet-api.jar
-path:
;%CATALINA_HOME%\bin;
MYSQL配置:
将此文件D:\Java\jar\mysql-connector-java-5.1.36-bin.jar copy到 D:\apache-tomcat-7.0.57\lib
CLASSPATH
D:\apache-tomcat-7.0.57\lib\mysql-connector-java-5.1.36-bin.jar
tomcat配置文件:
D:\apache-tomcat-7.0.57\conf里的 server.xml里增加以下语句:
<Context path="/wly" docBase="D:\Workspace\wly" reloadable="true">
</Context>
reloadable表示编译java文件后,不用重启服务器,即可更新classes里的class文件
在D:\WEB下新建WEB-INF文件夹,下面web.xml,文件夹classes,lib
classes下放java文件
D:\apache-tomcat-7.0.57\lib copy到 C:\Program Files\Java\jdk1.8.0_60\jre\lib\ext