一、安装JDK
================
第一步,双击jdk-1_2_2_006-win.exe文件进行安装,使用缺省配置进行安装
JDK的缺省安装目录为C:/jdk1.4.1,JRE的缺省安装目录为C:/Program Files/JavaSoft/JRE/1.4;
(但为了以后使用方便,可以选择一个比较好记的目录,如c:/jdk14;)
第二步,更新环境变量
CLASSPATH : .;c:/jdk1.2.2/lib/tools.jar;c:/jdk1.2.2/lib/dt.jar;
PATH: : c:/jdk1.2.2;c:/jdk1.2.2/bin;
TOMCAT用户管理
================
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="system" password="" roles="admin,manager"/>
</tomcat-users>
内存分配
================
设置tomcat内存
在tomcat的bin/catalina.bat文件中
rem Set JVM Memery Size
set JAVA_OPTS=-Xms800m -Xmx1024m
tomcat debug add following in catalina.bat
=================================
set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8778,server=y,suspend=n %JAVA_OPTS%
为tomcat指定jdk目录
1、bin/catalina.bat:
echo Using JAVA_HOME: %JAVA_HOME%
>>
echo Using JAVA_HOME: D:/jdk
2、bin/setclasspath.bat:
修改bin文件夹下面的setclasspath.bat文件,把如下内容:
rem Set standard command for invoking Java.
rem Note that NT requires a window name argument when using start.
rem Also note the quoting as JAVA_HOME may contain spaces.
set _RUNJAVA="%JAVA_HOME%/bin/java"
set _RUNJAVAW="%JAVA_HOME%/bin/javaw"
set _RUNJDB="%JAVA_HOME%/bin/jdb"
set _RUNJAVAC="%JAVA_HOME%/bin/javac"
修改为:
rem Set standard command for invoking Java.
rem Note that NT requires a window name argument when using start.
rem Also note the quoting as JAVA_HOME may contain spaces.
set _RUNJAVA="D:/jdk5/bin/java"
set _RUNJAVAW="D:/jdk5/bin/javaw"
set _RUNJDB="D:/jdk5/bin/jdb"
set _RUNJAVAC="D:/jdk5/bin/javac"