tomcat端口修改以及jvm启动参数设置
1、端口更改:找到config目录下server.xml文件 如下
- <?xml version='1.0' encoding='utf-8'?>
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <!-- Note: A "Server" is not itself a "Container", so you may not
- define subcomponents such as "Valves" at this level.
- Documentation at /docs/config/server.html
- -->
- <Server port="" shutdown="SHUTDOWN">
- <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
- <!-- Security listener. Documentation at /docs/config/listeners.html
- <Listener className="org.apache.catalina.security.SecurityListener" />
- -->
- <!--APR library loader. Documentation at /docs/apr.html -->
- <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
- <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
- <Listener className="org.apache.catalina.core.JasperListener" />
- <!-- Prevent memory leaks due to use of particular java/javax APIs-->
- <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
- <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
- <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
- <!-- Global JNDI resources
- Documentation at /docs/jndi-resources-howto.html
- -->
- <GlobalNamingResources>
- <!-- Editable user database that can also be used by
- UserDatabaseRealm to authenticate users
- -->
- <Resource name="UserDatabase" auth="Container"
- type="org.apache.catalina.UserDatabase"
- description="User database that can be updated and saved"
- factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
- pathname="conf/tomcat-users.xml" />
- </GlobalNamingResources>
- <!-- A "Service" is a collection of one or more "Connectors" that share
- a single "Container" Note: A "Service" is not itself a "Container",
- so you may not define subcomponents such as "Valves" at this level.
- Documentation at /docs/config/service.html
- -->
- <Service name="Catalina">
- <!--The connectors can use a shared executor, you can define one or more named thread pools-->
- <!--
- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
- maxThreads="" minSpareThreads=""/>
- -->
- <!-- A "Connector" represents an endpoint by which requests are received
- and responses are returned. Documentation at :
- Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
- Java AJP Connector: /docs/config/ajp.html
- APR (HTTP/AJP) Connector: /docs/apr.html
- Define a non-SSL HTTP/1.1 Connector on port
- -->
- <Connector port="8080" protocol="HTTP/1.1" maxHttpHeaderSize="8192"
- connectionTimeout="20000"
- redirectPort="8443" URIEncoding="UTF-8"/>
- <!-- A "Connector" using the shared thread pool-->
- <!--
- <Connector executor="tomcatThreadPool"
- port="8080" protocol="HTTP/1.1"
- connectionTimeout="20000"
- redirectPort="8443" URIEncoding="UTF-8"/>
- -->
- <!-- Define a SSL HTTP/1.1 Connector on port
- This connector uses the BIO implementation that requires the JSSE
- style configuration. When using the APR/native implementation, the
- OpenSSL style configuration is required as described in the APR/native
- documentation -->
- <!--
- <Connector port="" protocol="org.apache.coyote.http11.Http11Protocol"
- maxThreads="" SSLEnabled="true" scheme="https" secure="true"
- clientAuth="false" sslProtocol="TLS" />
- -->
- <!-- Define an AJP 1.3 Connector on port -->
- <Connector port="" protocol="AJP/1.3" redirectPort="" />
- <!-- An Engine represents the entry point (within Catalina) that processes
- every request. The Engine implementation for Tomcat stand alone
- analyzes the HTTP headers included with the request, and passes them
- on to the appropriate Host (virtual host).
- Documentation at /docs/config/engine.html -->
- <!-- You should set jvmRoute to support load-balancing via AJP ie :
- <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
- -->
- <Engine name="Catalina" defaultHost="localhost">
- <!--For clustering, please take a look at documentation at:
- /docs/cluster-howto.html (simple how to)
- /docs/config/cluster.html (reference documentation) -->
- <!--
- <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
- -->
- <!-- Use the LockOutRealm to prevent attempts to guess user passwords
- via a brute-force attack -->
- <Realm className="org.apache.catalina.realm.LockOutRealm">
- <!-- This Realm uses the UserDatabase configured in the global JNDI
- resources under the key "UserDatabase". Any edits
- that are performed against this UserDatabase are immediately
- available for use by the Realm. -->
- <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
- resourceName="UserDatabase"/>
- </Realm>
- <Host name="localhost" appBase="webapps"
- unpackWARs="true" autoDeploy="true">
- <!-- SingleSignOn valve, share authentication between web applications
- Documentation at: /docs/config/valve.html -->
- <!--
- <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
- -->
- <!-- Access log processes all example.
- Documentation at: /docs/config/valve.html
- Note: The pattern used is equivalent to using pattern="common" -->
- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
- prefix="localhost_access_log." suffix=".txt"
- pattern="%h %l %u %t "%r" %s %b" />
- </Host>
- </Engine>
- </Service>
- </Server>
我们一般只需要改掉我标红的port就行了。
2、启动参数设置
找到tomcat的bin目录下catalina.bat文件 ,打开如下
- SET JAVA_HOME=..\..\jdk1.7.0_60x64
- SET JAVA_OPTS=-server -Xmx8g -Xms8g -XX:MaxPermSize=2048m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseConcMarkSweepGC -Xloggc:e:/JVM_GC_XXX_8080.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps
- @echo off
- rem Licensed to the Apache Software Foundation (ASF) under one or more
- rem contributor license agreements. See the NOTICE file distributed with
- rem this work for additional information regarding copyright ownership.
- rem The ASF licenses this file to You under the Apache License, Version 2.0
- rem (the "License"); you may not use this file except in compliance with
- rem the License. You may obtain a copy of the License at
- rem
- rem http://www.apache.org/licenses/LICENSE-2.0
- rem
- rem Unless required by applicable law or agreed to in writing, software
- rem distributed under the License is distributed on an "AS IS" BASIS,
- rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- rem See the License for the specific language governing permissions and
- rem limitations under the License.
- rem ---------------------------------------------------------------------------
- rem Start/Stop Script for the CATALINA Server
- rem
- rem Environment Variable Prerequisites
- rem
- rem Do not set the variables in this script. Instead put them into a script
- rem setenv.bat in CATALINA_BASE/bin to keep your customizations separate.
- rem
- rem WHEN RUNNING TOMCAT AS A WINDOWS SERVICE:
- rem Note that the environment variables that affect the behavior of this
- rem script will have no effect at all on Windows Services. As such, any
- rem local customizations made in a CATALINA_BASE/bin/setenv.bat script
- rem will also have no effect on Tomcat when launched as a Windows Service.
- rem The configuration that controls Windows Services is stored in the Windows
- rem Registry, and is most conveniently maintained using the "tomcatXw.exe"
- rem maintenance utility, where "X" is the major version of Tomcat you are
- rem running.
- 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 "run" or "debug" command is executed.
- rem Include here and not in JAVA_OPTS all options, that should
- rem only be used by Tomcat itself, not by the stop process,
- rem the version command etc.
- rem Examples are heap size, GC logging, JMX ports etc.
- 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. If JRE_HOME and JAVA_HOME
- rem are both set, JRE_HOME is used.
- rem
- rem JAVA_OPTS (Optional) Java runtime options used when any command
- rem is executed.
- rem Include here and not in CATALINA_OPTS all options, that
- rem should be used by Tomcat and also by the stop process,
- rem the version command etc.
- rem Most options should go into CATALINA_OPTS.
- rem
- rem JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated directories
- rem containing some jars in order to allow replacement of APIs
- rem created outside of the JCP (i.e. DOM and SAX from W3C).
- rem It can also be used to update the XML parser implementation.
- rem Defaults to $CATALINA_HOME/endorsed.
- rem
- rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
- rem command is executed. The default is "dt_socket".
- rem
- rem JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
- rem command is executed. The default is 8000.
- 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 -agentlib:jdwp=transport=%JPDA_TRANSPORT%,
- rem address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
- rem
- rem JSSE_OPTS (Optional) Java runtime options used to control the TLS
- rem implementation when JSSE is used. Default is:
- rem "-Djdk.tls.ephemeralDHKeySize=2048"
- rem
- rem LOGGING_CONFIG (Optional) Override Tomcat's logging config file
- rem Example (all one line)
- rem set LOGGING_CONFIG="-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"
- rem
- rem LOGGING_MANAGER (Optional) Override Tomcat's logging manager
- rem Example (all one line)
- rem set LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
- rem
- rem TITLE (Optional) Specify the title of Tomcat window. The default
- rem TITLE is Tomcat if it's not specified.
- rem Example (all one line)
- rem set TITLE=Tomcat.Cluster#1.Server#1 [%DATE% %TIME%]
- rem ---------------------------------------------------------------------------
- setlocal
- rem Suppress Terminate batch job on CTRL+C
- if not ""%1"" == ""run"" goto mainEntry
- if "%TEMP%" == "" goto mainEntry
- if exist "%TEMP%\%~nx0.run" goto mainEntry
- echo Y>"%TEMP%\%~nx0.run"
- if not exist "%TEMP%\%~nx0.run" goto mainEntry
- echo Y>"%TEMP%\%~nx0.Y"
- call "%~f0" %* <"%TEMP%\%~nx0.Y"
- rem Use provided errorlevel
- set RETVAL=%ERRORLEVEL%
- del /Q "%TEMP%\%~nx0.Y" >NUL 2>&1
- exit /B %RETVAL%
- :mainEntry
- del /Q "%TEMP%\%~nx0.run" >NUL 2>&1
- 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 Copy CATALINA_BASE from CATALINA_HOME if not defined
- if not "%CATALINA_BASE%" == "" goto gotBase
- set "CATALINA_BASE=%CATALINA_HOME%"
- :gotBase
- 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 not exist "%CATALINA_BASE%\bin\setenv.bat" goto checkSetenvHome
- call "%CATALINA_BASE%\bin\setenv.bat"
- goto setenvDone
- :checkSetenvHome
- if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
- :setenvDone
- 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
- 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_TMPDIR%" == "" goto gotTmpdir
- set "CATALINA_TMPDIR=%CATALINA_BASE%\temp"
- :gotTmpdir
- rem Add tomcat-juli.jar to classpath
- rem tomcat-juli.jar can be over-ridden per instance
- if not exist "%CATALINA_BASE%\bin\tomcat-juli.jar" goto juliClasspathHome
- set "CLASSPATH=%CLASSPATH%;%CATALINA_BASE%\bin\tomcat-juli.jar"
- goto juliClasspathDone
- :juliClasspathHome
- set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar"
- :juliClasspathDone
- if not "%JSSE_OPTS%" == "" goto gotJsseOpts
- set JSSE_OPTS="-Djdk.tls.ephemeralDHKeySize=2048"
- :gotJsseOpts
- set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%"
- if not "%LOGGING_CONFIG%" == "" goto noJuliConfig
- set LOGGING_CONFIG=-Dnop
- if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
- set LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
- :noJuliConfig
- set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%"
- if not "%LOGGING_MANAGER%" == "" goto noJuliManager
- set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
- :noJuliManager
- set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%"
- 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_socket
- :gotJpdaTransport
- if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
- set JPDA_ADDRESS=8000
- :gotJpdaAddress
- if not "%JPDA_SUSPEND%" == "" goto gotJpdaSuspend
- set JPDA_SUSPEND=n
- :gotJpdaSuspend
- if not "%JPDA_OPTS%" == "" goto gotJpdaOpts
- set JPDA_OPTS=-agentlib:jdwp=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"" == ""configtest"" goto doConfigTest
- 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 configtest Run a basic syntax check on server.xml
- echo version What version of tomcat are you running?
- goto end
- :doDebug
- shift
- set _EXECJAVA=%_RUNJDB%
- set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\java"
- 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 "%TITLE%" == "" set TITLE=Tomcat
- set _EXECJAVA=start "%TITLE%" %_RUNJAVA%
- 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
- :doConfigTest
- shift
- set ACTION=configtest
- set CATALINA_OPTS=
- goto execCmd
- :doVersion
- %_EXECJAVA% -classpath "%CATALINA_HOME%\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% %JPDA_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
- :doSecurityJpda
- %_EXECJAVA% %JAVA_OPTS% %JPDA_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
- :end
#以上红色部分则为参数设置。
tomcat端口修改以及jvm启动参数设置的更多相关文章
- jvm 启动参数设置(转载)
JVM启动参数 http://onlyor.iteye.com/blog/1722413 博客分类: java java java启动参数共分为三类其一是标准参数(-),所有的JVM实现都必须实现这些 ...
- jvm启动参数设置 -Dfile.encoding=UTF-8 解决freemark乱码
今天一个spring boot应用windows跑起来后页面显示乱码,加上jvm启动参数为utf-8后,页面显示正常.
- JVM启动参数设置
详见:http://blog.yemou.net/article/query/info/tytfjhfascvhzxcyt174 不管是YGC还是Full GC,GC过程中都会对导致程序运行中中断,正 ...
- 修改weblogic jvm启动参数
进入: D:\Oracle\Middleware\user_projects\domains\base_domain\startWebLogic.cmd 在call 上一行增加: set USER_M ...
- NetBeansRCP-添加/修改NetBeans的JVM启动参数
NetBeans运行的速度实在是不敢恭维.还好机器配置还可以,修改其JVM启动参数命令行,以期运行的更加顺畅. 那么如何修改NetBeans IDE的JVM参数呢? 1.到NetBeans IDE的安 ...
- jvm常用参数设置 专题
在jdk8中 -Xms2g不合法,能通过的:-Xms2G #!/bin/bash JAVA_OPTS="-Xms4G -Xmx4G -XX:+HeapDumpOnOutOfMemoryErr ...
- jvm常用参数设置 good
1.堆的大小可以通过 -Xms 和 -Xmx 来设置,一般将他们设置为相同的大小,目的是避免在每次垃圾回收后重新调整堆的大小,比如 -Xms=2g -Xmx=2g 或者 -Xms=512m -Xmx= ...
- Eclipse jvm启动参数在哪设置
学习并转载自https://jingyan.baidu.com/article/624e7459653ca534e8ba5a26.html Java是一门非常受欢迎的编程语言,Java的开发人员多数使 ...
- JVM系统属性 OS环境变量 JVM启动参数
JVM系统属性(System Properties) 1.不支持通过文件查看和设置系统属性 2.可以通过JDK自带的工具jvisulavm.exe查看 3.可以在Java程序中使用API来查看系统属性 ...
随机推荐
- Spring Boot 2 - 初识与新工程的创建
Spring Boot的由来 相信大家都听说过Spring框架. Spring从诞生到现在一直是流行的J2EE开发框架. 随着Spring的发展,它的功能越来越强大,随之而来的缺点也越来越明显,以至于 ...
- Android 自定义 View 绘制
在 Android 自定义View 里面,介绍了自定义的View的基本概念.同时在 Android 控件架构及View.ViewGroup的测量 里面介绍了 Android 的坐标系 View.Vie ...
- 腾讯开源 MMKV — 基于mmap的高性能通用key-value组件
一.介绍 MMKV 是基于 mmap 内存映射的 key-value 组件,底层序列化/反序列化使用 protobuf 实现,性能高,稳定性强.从 2015 年中至今,在 iOS 微信上使用已有近 3 ...
- Android NDK学习(七):NDK 编译支持 C++特有的库
如果你的C++代码中出现了很多C++特有的库,例如<iostream>,<list>等,那么你还需要在jni的文件夹下添加一个Application.mk文件,文件内容为: A ...
- Java 11 究竟比 8 快了多少?
阅读本文大概需要 1.2 分钟. 作者:h4cd 来源:开源中国社区 开源规划调度引擎 OptaPlanner 官网发布了一个 Java 11 GC 性能基准测试报告. 当前使用量最大的 Java 版 ...
- 第43节:Java学前要点
Java学前要点 01 学习Java,有人推荐去培训,有人说没用,其实有钱的,不知道如何学,或者逼不得已去的就可以,也有人自己为了不花这些钱,而选择自学,我觉得也行. 现在大部分人学东西要学的好,都是 ...
- LabVIEW(四):数据存储和文件IO
1.使用NI数据采集板卡来进行数据保存和文件I/O操作.2.在一个典型的测试测量系统当中,包括:信号调理.信号采集.信号分析.信号显示.数据存储.数据存储:将采集到的数据储存到磁盘上,以备日后离线分析 ...
- Fiddler修改请求、返回数据
相信你们有听过说“绕过前端”,但是可能想不到要怎样才能绕过前端呢? 首先,我们要知道什么是绕过前端?比如:登录用户名限制数字.6位,用户在登录页面填写用户名符合要求,使用Fiddler作为代理,拦截登 ...
- odoo开发笔记 -- self详解
python中一切皆对象! odoo基于python开发,那么odoo中也可以理解成一切皆对象. 我们在python中定义类的时候,一般会用到self,用来表示当前对象自己. 那么odoo中的self ...
- (转载)java内存模型
java并发采用的是共享内存模型,线程之间的通信对程序员来说是透明的,内存可见性问题很容易困扰着java程序员,今天我们就来揭开java内存模型的神秘面纱. 在揭开面纱之前,我们需要认识几个基础概念: ...