- 浏览: 1217683 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (706)
- 全部博客(10000) (0)
- java基础 (123)
- 算法及数据结构 (64)
- SSH框架整合与平台系统分析 (11)
- j2ee (46)
- Oracle (95)
- SQL Server (11)
- javaScript (73)
- Ajax (22)
- jQuery (39)
- ExtJs (4)
- jsp (13)
- Servlet (6)
- struts1 (2)
- struts2 (33)
- Ibatis (2)
- hibernate (24)
- Spring (11)
- 设计模式 (8)
- 正则表达式 (9)
- UML (0)
- XML (9)
- linux (19)
- CSS (11)
- FreeMarker (4)
- nginx 与 memcached (6)
- SEO (5)
- Web 服务器 (11)
- junit 与 selenium2 (4)
- MyEclipse 有关的问题 (24)
- 生活杂感 (37)
- 看过的书 (2)
- 技术牛人 (2)
- 需要优化的例子 (3)
- English 学习 (7)
- bug修改的解决方法 (2)
- 数据库实战经验总结 (1)
- 期待解决的问题 (20)
- 等待自己学习的东西 (15)
- 自己公司代码结构总结 (15)
- 企业经营之道 (23)
- 工具管理 (1)
- 世范水晶 (2)
最新评论
-
hustkeai:
第一个方法是不对的
求一个Map中最大的value值,同时列出键,值 -
qq591920734:
java List 排序 Collections.sort() 对 List 排序(首先年龄排序,如果年龄相同,则按名字排序) -
qq591920734:
[color=orange][/color]包女包女不女
java List 排序 Collections.sort() 对 List 排序(首先年龄排序,如果年龄相同,则按名字排序) -
timer_yin:
seagrave 写道这个算法想法不错,但太耗时,我用1、2、 ...
用1、2、2、3、4、5这六个数字,数字排序经典算法 -
hellostory:
日常生活中,我们都不按你上面的那个方法算的!!!
JAVA小函数-计算日期差
进入 tomcat 的 bin 中打开 catalina.bat
里面的内容如下:添加绿色内容即可。
@echo off
if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem Start/Stop Script for the CATALINA Server
rem
rem Environment Variable Prequisites
rem
rem CATALINA_HOME May point at your Catalina "build" directory.
rem
rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions
rem of a Catalina installation. If not present, resolves to
rem the same directory that CATALINA_HOME points to.
rem
rem CATALINA_OPTS (Optional) Java runtime options used when the "start",
rem or "run" command is executed.
rem
rem CATALINA_TMPDIR (Optional) Directory path location of temporary directory
rem the JVM should use (java.io.tmpdir). Defaults to
rem %CATALINA_BASE%\temp.
rem
rem JAVA_HOME Must point at your Java Development Kit installation.
rem Required to run the with the "debug" argument.
rem
rem JRE_HOME Must point at your Java Runtime installation.
rem Defaults to JAVA_HOME if empty.
rem
rem JAVA_OPTS (Optional) Java runtime options used when the "start",
rem "stop", or "run" command is executed.
rem
rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
rem command is executed. The default is "dt_shmem".
rem
rem JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
rem command is executed. The default is "jdbconn".
rem
rem JPDA_SUSPEND (Optional) Java runtime options used when the "jpda start"
rem command is executed. Specifies whether JVM should suspend
rem execution immediately after startup. Default is "n".
rem
rem JPDA_OPTS (Optional) Java runtime options used when the "jpda start"
rem command is executed. If used, JPDA_TRANSPORT, JPDA_ADDRESS,
rem and JPDA_SUSPEND are ignored. Thus, all required jpda
rem options MUST be specified. The default is:
rem
rem -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,
rem address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
rem
rem $Id: catalina.bat 795032 2009-07-17 10:41:20Z markt $
rem ---------------------------------------------------------------------------
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m
rem Guess CATALINA_HOME if not defined
set CURRENT_DIR=%cd%
if not "%CATALINA_HOME%" == "" goto gotHome
set CATALINA_HOME=%CURRENT_DIR%
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
cd ..
set CATALINA_HOME=%cd%
cd %CURRENT_DIR%
:gotHome
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
echo The CATALINA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome
rem Ensure that any user defined CLASSPATH variables are not used on startup,
rem but allow them to be specified in setenv.bat, in rare case when it is needed.
set CLASSPATH=
rem Get standard environment variables
if "%CATALINA_BASE%" == "" goto gotSetenvHome
if exist "%CATALINA_BASE%\bin\setenv.bat" call "%CATALINA_BASE%\bin\setenv.bat"
goto gotSetenvBase
:gotSetenvHome
if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
:gotSetenvBase
rem Get standard Java environment variables
if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat
echo This file is needed to run this program
goto end
:okSetclasspath
set BASEDIR=%CATALINA_HOME%
call "%CATALINA_HOME%\bin\setclasspath.bat" %1
if errorlevel 1 goto end
rem Add on extra jar file to CLASSPATH
rem Note that there are no quotes as we do not want to introduce random
rem quotes into the CLASSPATH
if "%CLASSPATH%" == "" goto emptyClasspath
set CLASSPATH=%CLASSPATH%;
:emptyClasspath
set CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar
if not "%CATALINA_BASE%" == "" goto gotBase
set CATALINA_BASE=%CATALINA_HOME%
:gotBase
if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir
set CATALINA_TMPDIR=%CATALINA_BASE%\temp
:gotTmpdir
if not exist "%CATALINA_HOME%\bin\tomcat-juli.jar" goto noJuli
set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
:noJuli
rem ----- Execute The Requested Command ---------------------------------------
echo Using CATALINA_BASE: %CATALINA_BASE%
echo Using CATALINA_HOME: %CATALINA_HOME%
echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
if ""%1"" == ""debug"" goto use_jdk
echo Using JRE_HOME: %JRE_HOME%
goto java_dir_displayed
:use_jdk
echo Using JAVA_HOME: %JAVA_HOME%
:java_dir_displayed
echo Using CLASSPATH: %CLASSPATH%
set _EXECJAVA=%_RUNJAVA%
set MAINCLASS=org.apache.catalina.startup.Bootstrap
set ACTION=start
set SECURITY_POLICY_FILE=
set DEBUG_OPTS=
set JPDA=
if not ""%1"" == ""jpda"" goto noJpda
set JPDA=jpda
if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
set JPDA_TRANSPORT=dt_shmem
:gotJpdaTransport
if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
set JPDA_ADDRESS=jdbconn
:gotJpdaAddress
if not "%JPDA_SUSPEND%" == "" goto gotJpdaSuspend
set JPDA_SUSPEND=n
:gotJpdaSuspend
if not "%JPDA_OPTS%" == "" goto gotJpdaOpts
set JPDA_OPTS=-Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
:gotJpdaOpts
shift
:noJpda
if ""%1"" == ""debug"" goto doDebug
if ""%1"" == ""run"" goto doRun
if ""%1"" == ""start"" goto doStart
if ""%1"" == ""stop"" goto doStop
if ""%1"" == ""version"" goto doVersion
echo Usage: catalina ( commands ... )
echo commands:
echo debug Start Catalina in a debugger
echo debug -security Debug Catalina with a security manager
echo jpda start Start Catalina under JPDA debugger
echo run Start Catalina in the current window
echo run -security Start in the current window with security manager
echo start Start Catalina in a separate window
echo start -security Start in a separate window with security manager
echo stop Stop Catalina
echo version What version of tomcat are you running?
goto end
:doDebug
shift
set _EXECJAVA=%_RUNJDB%
set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\jakarta-tomcat-catalina\catalina\src\share"
if not ""%1"" == ""-security"" goto execCmd
shift
echo Using Security Manager
set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
goto execCmd
:doRun
shift
if not ""%1"" == ""-security"" goto execCmd
shift
echo Using Security Manager
set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
goto execCmd
:doStart
shift
if not "%OS%" == "Windows_NT" goto noTitle
set _EXECJAVA=start "Tomcat" %_RUNJAVA%
goto gotTitle
:noTitle
set _EXECJAVA=start %_RUNJAVA%
:gotTitle
if not ""%1"" == ""-security"" goto execCmd
shift
echo Using Security Manager
set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
goto execCmd
:doStop
shift
set ACTION=stop
set CATALINA_OPTS=
goto execCmd
:doVersion
%_EXECJAVA% -classpath "%CATALINA_HOME%\server\lib\catalina.jar" org.apache.catalina.util.ServerInfo
goto end
:execCmd
rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs
rem Execute Java with the applicable properties
if not "%JPDA%" == "" goto doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:end
发表评论
-
Tomcat并发数优化的方法总结
2013-09-05 18:33 9881、Tomcat并发数优化的方法总结 2、T ... -
nginx配置详解
2012-10-15 11:10 1131Nginx 配置文件详解 分页大小可以用命令getc ... -
jboss 的重启命令
2012-06-11 19:11 1042关掉命令 sh shutdown.sh -S 驱动命 ... -
cmd 命令行下复制、粘贴的快捷键,方便快速的在cmd操作复制粘贴。
2012-05-17 15:33 19191、cmd 命令行下复制、粘贴的快捷键,方便快速的在cmd操作 ... -
tomcat6 数据源配置(server.xml方式和context.xml方式)
2012-04-26 09:09 13321、tomcat6 数据源配置(server.xml方式和co ... -
tomcat6 数据源配置(server.xml方式和context.xml方式)
2012-04-16 14:14 1071来源:http://xiaoxinshome.iteye.co ... -
weblogic安装及部署过程
2011-07-04 20:56 1230一个老兄总结的weblogic安装及部署过程! http:/ ... -
weblogic 部署后有代码更新应该怎么再部署。
2011-07-04 20:50 3974weblogic 部署后有代码更新应该怎么再部署。 ... -
设置 Eclipse 或 MyEclipse 内存大小
2011-06-23 12:40 1850点击Open launch configuration ... -
MyEclipse + Weblogic 10的配置
2010-01-20 17:38 835网站地址: http://5aijava.iteye.com ...
相关推荐
### 如何设置Tomcat内存大小 要修改Tomcat的内存参数,主要操作步骤如下: 1. **定位配置文件**:找到Tomcat安装目录下的`bin`目录,其中包含`catalina.sh`(Unix/Linux系统)或`catalina.bat`(Windows系统)脚本...
### 修改Tomcat内存大小 在部署Java Web应用时,经常需要根据实际运行需求调整Tomcat服务器的内存配置。本文将详细介绍如何修改Tomcat的内存大小,包括常用的内存参数及其意义,并提供具体的设置方法。 #### 一、...
"TOMCAT内存大小调整" TOMCAT内存大小调整是指在使用Java程序从数据库中查询大量数据或应用服务器(如Tomcat、JBoss、WebLogic)加载jar包时,出现java.lang.OutOfMemoryError异常的解决方法。这种异常主要是由于...
设置Tomcat内存大小主要是调整JVM的启动参数。有两种常见的启动方式: 1. **使用startup.bat脚本启动**:在Windows环境下,可以在`set JAVA_OPTS=-Xms64m -Xmx128m`之前添加环境变量,这将设置JVM的初始堆内存(Xms...
修改eclipse中的tomcat内存的大小,以防止内存溢出。-------------------------------------------------------------------------------------------------------------------------------------------------------...
### Tomcat内存设置详解 #### 引言 在构建高性能且稳定的Web应用时,合理配置Tomcat内存参数是至关重要的一步。Tomcat作为一款广泛使用的开源应用服务器,其性能受到诸多因素的影响,其中内存配置尤为关键。正确的...
Tomcat初始启动内存设置 ...通过环境变量或修改Catalina.bat文件的方法,可以轻松地设置Tomcat的初始内存大小。然而,需要根据实际情况来设置合适的初始内存大小,以避免服务器的性能下降或内存溢出。
Tomcat 修改内存大小 Tomcat 是一个流行的基于 Java 的 Web 应用服务器,为了确保 Tomcat 的稳定运行,需要根据实际情况调整 Tomcat 的内存大小。下面将介绍如何修改 Tomcat 的内存大小,在 Windows 和 Linux 两个...
- 其中,`-Xms`表示初始堆内存大小,`-Xmx`表示最大堆内存大小,`-XX:PermSize`表示永久代初始大小,`-XX:MaxPermSize`表示永久代最大大小,`-XX:MaxNewSize`表示新生代最大大小,`-Djava.awt.headless=true`则表示...
设置Tomcat的JVM虚拟机内存大小是为了确保服务器能够高效地运行并避免因内存溢出而导致的性能问题或服务中断。 内存溢出是由于程序在运行过程中需要的内存超过了JVM所能提供的最大内存。这可能是由于以下几个原因:...
1. **内存大小的选择**:设置的内存大小应基于实际的应用需求和服务器硬件资源。过大或过小都会对性能造成负面影响。 2. **监控与调整**:在调整完内存参数后,建议持续监控系统的性能表现,必要时进行微调。 3. **...