Questions tagged [jvm-arguments]

Command-line options and environment variables that can affect the performance characteristics of the Java Virtual Machine

There are several categories of JVM arguments:

  1. Standard options recognized by the Java application launcher (e.g. -client, -classpath, ...)
  2. Options that begin with -X which are non-standard (not guaranteed to be supported on all VM implementations) and are subject to change without notice in subsequent releases of the JDK (e.g. -Xbootclasspath, -Xms, -Xloggc, ...)
  3. Options that are specified with -XX are not stable and are subject to change without notice (e.g. -XX:+PrintGCDetails, -XX:-UseParallelGC, ...)

References:

703 questions
13
votes
3 answers

How to specify firstDayOfWeek for java.util.Calendar using a JVM argument

I'm trying to change default firstDayOfWeek for java.util.Calendar from SUNDAY to MONDAY. Is it possible to achieve this through JVM configuration instead of adding this piece of code? cal.setFirstDayOfWeek(Calendar.MONDAY);
user35172
  • 133
  • 1
  • 2
  • 4
13
votes
1 answer

JVM arguments for HTTPS nonProxyHosts

So I have a fairly loaded env variable for _JAVA_OPTIONS export _JAVA_OPTIONS="-Dhttp.proxyHost=my-proxy.com -Dhttp.proxyPort=1080 -Dhttps.proxyHost=my-proxy.com -Dhttps.proxyPort=1080 -DsocksProxyHost=my-socks-proxy.com …
Bob
  • 8,424
  • 17
  • 72
  • 110
13
votes
4 answers

What is Java's -XX:+UseMembar parameter

I see this parameter in all kinds of places (forums, etc.) and the common answer it help highly concurrent servers. Still, I cannot find an official documentation from sun explaining what it does. Also, was it added in Java 6 or did it exist in Java…
David Rabinowitz
  • 29,904
  • 14
  • 93
  • 125
12
votes
1 answer

Why does 64 bit JVM throw Out Of Memory before xmx is reached?

I am wrestling with large memory requirements for a java app. In order to address more memory I have switch to a 64 bit JVM and am using a large xmx. However, when the xmx is above 2GB the app seems to run out of memory earlier than expected. When…
Al Quinn
  • 123
  • 1
  • 5
12
votes
2 answers

Find Java options used by Maven

How can I find which Java options (Xmx, Xms, Xss, etc) are being used by Maven? I've found out that a way to set them is via the environment MAVEN_OPTS. Now I want a way to be assured it's getting the right settings. EDIT: I believe it´s different…
Victor Basso
  • 5,556
  • 5
  • 42
  • 60
12
votes
3 answers

TeamCity how to set JVM Arguments

my teamcity build server has following JVM Arguments: -Xmx512m -XX:MaxPermSize=270m sometimes it shows some memory problem message like "TeamCity server memory usage for PS Old Gen pool exceeded 91% of 341 MB maximum available. 437 MB used of 506…
SLimke
  • 291
  • 1
  • 3
  • 11
12
votes
3 answers

PS Old Gen memory in Heap Memory Usage: GC settings for Java Out Of Memory Exception

Below are my JVM settings: JAVA_OPTS=-server -Xms2G -Xmx2G -XX:MaxPermSize=512M -Dsun.rmi.dgc.client.gcInterval=1200000 -Dsun.rmi.dgc.server.gcInterval=1200000 -XX:+UseParallelOldGC -XX:ParallelGCThreads=2 -XX:+UseCompressedOops …
amitsalyan
  • 658
  • 1
  • 8
  • 29
11
votes
2 answers

How can one send a Ctrl-Break to a running Linux process?

I am debugging a memory leak in an application running on Sun's JDK 1.4.2_18. It appears that this version supports the command line param -XX:+HeapDumpOnCtrlBreak which supposedly causes the JVM to dump heap when it encounters a control-break. …
ShabbyDoo
  • 1,256
  • 1
  • 11
  • 20
11
votes
1 answer

How to restrict createObject() on certain java classes or packages?

I want to create a secure ColdFusion environment, for which I am using multiple sandboxes configuration. The following tasks are easily achievable using the friendly administrator interface: Restricting CFtags like: cfexecute, cfregistry and…
Anurag
  • 1,018
  • 1
  • 14
  • 36
11
votes
1 answer

Java -server argument

Possible Duplicate: Real differences between “java -server” and “java -client”? I've seen the argument "-server" used as a command line argument for java.exe: java.exe -server MyClass but no matter how hard I searched the internet I found no…
Savvas Dalkitsis
  • 11,476
  • 16
  • 65
  • 104
11
votes
2 answers

How to set multiple JAVA_OPTS options in startup.bat

I am trying to pass multiple parameters when I start tomcat through startup.bat. I tried adding these lines at the top of startup.bat file, however they do not work. set JAVA_OPTS="-Dapplication.home=E:\\webapp…
Mono Jamoon
  • 4,437
  • 17
  • 42
  • 64
11
votes
2 answers

JVM command line options

Possible Duplicate: JVM Options List - still being maintained post Oracle? Is there a page anywhere with a definitive complete list of the command line options available to run a JVM? Everywhere I look I get referred to…
Mark
  • 1,754
  • 3
  • 26
  • 43
10
votes
7 answers

Reducing JVM pause time > 1 second using UseConcMarkSweepGC

I'm running a memory intensive app on a machine with 16Gb of RAM, and an 8-core processor, and Java 1.6 all running on CentOS release 5.2 (Final). Exact JVM details are: java version "1.6.0_10" Java(TM) SE Runtime Environment (build…
sanity
  • 35,347
  • 40
  • 135
  • 226
10
votes
1 answer

Difference between -XX:+PrintGC and -verbose:gc

I want to understand the difference between: -XX:+PrintGC and -verbose:gc Apparently these look similar. This article doesn't list the verbose:gc http://www.oracle.com/technetwork/articles/java/vmoptions-jsp-140102.html I also saw these two…
Aqeel Ashiq
  • 1,988
  • 5
  • 24
  • 57
10
votes
4 answers

Passing an entire file to JVM arguments

I have several systems that all need to load the same properties to the JVM. I can use the -D flag to load one property at a time, but i am looking for something that will load all the properties in an entire file at one time. For instance: I…
doug
  • 1,963
  • 2
  • 16
  • 24