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
4
votes
2 answers

How to I get programmatic access to check -Xms -Xmx and -XX:MaxPermSize JVM argument values?

Possible Duplicate: Read Java JVM startup parameters (eg -Xmx) I'm running an application on a Tomcat server, and I want to access the values of the -Xms -Xmx and -XX:MaxPermSize JVM argument values so that I can log them for help with debugging.…
Spike Williams
  • 35,795
  • 13
  • 48
  • 60
4
votes
1 answer

JDK 1.6 GC AdaptiveSizeThroughPutPolicy

Please explain the detailed meaning of VALUE used in the GC option : -XX:AdaptiveSizeThroughPutPolicy By default value given is 0. Does this VALUE imply - the number of steps to use heuristics before real data is used?. What are implications of…
Anna
  • 855
  • 2
  • 10
  • 26
4
votes
1 answer

Gradle does not honor --add-modules jvm argument in JDK9

I am trying JDK9 (9-ea+143), and need to set --add-modules java.xml.bind. I have tried: Setting GRADLE_OPTS="--add-modules java.xml.bind '-Dorg.gradle.jvmargs=--add-modules java.xml.bind'" Setting org.gradle.jvmargs=--add-modules java.xml.bind in…
neu242
  • 15,796
  • 20
  • 79
  • 114
4
votes
1 answer

SpringBoot: How to provide VM Argument in Spring Boot App, while running from Eclipse

I'm Using Spring Boot 1.3.0.RELEASE. And for my application, I'm providing some external jar path like below, while I'm running the app from CMD. java -Dloader.path="lib,config,C:/TM/ojdbc14-10.2.0.2.0.jar,spring" -jar…
anij
  • 1,322
  • 5
  • 23
  • 39
4
votes
3 answers

Is there something like "-XX:OnError" or "-XX:OnOutOfMemoryError" in IBM JVM?

There are two following options in Java HotSpot VM Options: -XX:OnError=";" Run user-defined commands on fatal error. (Introduced in 1.4.2 update 9.) -XX:OnOutOfMemoryError="; " Run user-defined commands…
Volodymyr Bezuglyy
  • 16,295
  • 33
  • 103
  • 133
4
votes
2 answers

How to use play framework config library command line parameters in non play application

In play application I can add command line parameters to override default config in resourses: ... -Dconfig.file=/opt/conf/prod.conf I develop non-play application with play config library and generate jar with sbt-assembly. Upd I want use command…
zella
  • 4,645
  • 6
  • 35
  • 60
4
votes
1 answer

Java 8 with Jetty on linux memory issue

Can you please help me resolving the following issue: Context: We are trying to migrate our existing application which is currently running on Java6( on Glassfish) in production to Java8 (on Jetty9) setup. Earlier, We were able to successfully…
Diablo
  • 443
  • 7
  • 21
4
votes
0 answers

How to set system property for Gradle Daemon

I would like to set a JVM system property for the Gradle daemon process. I tried the following in ~/.gradle/gradle.properties: org.gradle.daemon=true org.gradle.jvmargs=-Djava.net.preferIPv4Stack=true It seems org.gradle.jvmargs mentioned here does…
centic
  • 15,565
  • 9
  • 68
  • 125
4
votes
3 answers

Putting JVM arguments in a file to be picked up at runtime

I'm building a jar of my current application, which required several JVM arguments to be set. Is there a way of setting these JVM arguments in a file rather than on the command line? I've done some hunting and it looks like I might be able to do…
Omar Kooheji
  • 54,530
  • 68
  • 182
  • 238
4
votes
1 answer

Xss set thread stack size for 1 thread, what is the limitation for all thread's stack size

I know how to set stack size for java thread using -Xss, and we use it in our product. But when there are lots of thread used in our application , and -Xss is set (we set to 512k for our usage). we will encounter error reporting unable to create…
Ben Xu
  • 1,279
  • 4
  • 13
  • 26
4
votes
2 answers

Is it possible to "fool" java that an environment variable is set from the command line

I'm running in an environment where I can pass parameters but not set environment variables using a normal commandline. I would like to set environment variables nevertheless. Is there an alternative way to "fool" java that an environment variable…
Marcin
  • 48,559
  • 18
  • 128
  • 201
4
votes
2 answers

How to pass JVM argument to Teamcity using env variable

I have read the Teamcity documentation and searched on this topic and found that you can pass any JVM arguments to Teamcity on startup by setting an environment variable: TEAMCITY_SERVER_MEM_OPTS What my problem is - I couldn't find anywhere how to…
Vasil Valchev
  • 63
  • 1
  • 8
4
votes
4 answers

Which memory related Tomcat JVM startup parameters are worth tuning?

I'm trying to understand the fine art of tuning Tomcat memory settings. In this quest I have the following three questions: Which memory related JVM startup parameters are worth setting when running Tomcat? Why? What are useful rule-of-thumbs when…
knorv
  • 49,059
  • 74
  • 210
  • 294
4
votes
0 answers

How to enable logging in XStream?

I am struggling to load a manually converted XML file with XStream. I do no longer receive an exception on unmarshalling it, but in the resulting objects, paths are null that I do not expect to be null. Is there a way to enable debug logging in…
JRA_TLL
  • 1,186
  • 12
  • 23
4
votes
0 answers

Using Java build option useLegacyMergeSort=true with android gradle

I'm trying to set the following option: -Djava.util.Arrays.useLegacyMergeSort=true with gradle build for android. This is to circumvent this issue My question is how do I add this option in 'Android Studio'? I tried to add it in the Compiler->VM…
Rajath
  • 11,787
  • 7
  • 48
  • 62