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

What does the java option -XX:-EliminateAllocations do?

What does the java option -XX:-EliminateAllocations do? I couldn't find any documentation about it.
hbelmiro
  • 987
  • 11
  • 31
6
votes
2 answers

XX:+HeapDumpOnOutOfMemoryError Max file size limit

I'm running a Java process with the XX:+HeapDumpOnOutOfMemoryError JVM flag and seeing the following output: java.lang.OutOfMemoryError: Java heap space Dumping heap to /local/disk2/heaps/heapdump.hprof ... Dump file is incomplete: file size…
sydraz
  • 653
  • 6
  • 12
6
votes
1 answer

Xloggc not creating log file if path doesn't exist for the first time

-Xss256k -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+Pr…
Ram
  • 93
  • 1
  • 6
6
votes
1 answer

Java Exceptions counter on JVM HotSpot

I am wondering is it possible to log every exception which occurs on JVM level without changing application code? By every exception I mean caught and uncaught exception... I would like to analyze those logs later and group them by exception type…
6
votes
3 answers

Import SpringSource into IDEA.But had a error "Unrecognized VM option 'MaxMetaspaceSize=1024m'"

I want to import Spring-framework into IDEA. I followed the document, and run the following command, but I had a error: spring-framework>gradlew.bat :spring-oxm:compileTestJava cleanIdea idea Unrecognized VM option 'MaxMetaspaceSize=1024m' Could…
diguage
  • 387
  • 4
  • 19
6
votes
3 answers

How to determine if -server option set on your JVM instance

I'm trying to determine if the JVM (using jdk 1.7u3) -server option is enabled by default on my JVM instances. Based on my environment (Windows 2008 Server R2) and the Server-Class Machine detection information I'd expected it to be set though I'd…
Simon
  • 81
  • 1
  • 4
5
votes
6 answers

Jetty 7: OutOfMemoryError: PermGen space on application redeploy

First time app starts correctly. Then I delete webapp/*.war file and paste new version of *.war. Jetty start deploying new war but error java.lang.OutOfMemoryError: PermGen space occurs. How can I configure Jetty to fix error / make correct…
fedor.belov
  • 22,343
  • 26
  • 89
  • 134
5
votes
2 answers

How to fine tune JVM configurations to reduce the max thread stack size?

I want to change the default thread stack size in Java for my Spring-Boot Web application. How can I change this? or which parameter I need to use to change this value? Also, the second question is, can I programmatically change this at runtime?
ZestBest
  • 55
  • 6
5
votes
1 answer

How to add VM arguments in Launch4j

I've had some confusion in trying to create a .exe file to run my JavaFX application. In Eclipse I use the VM Argument: --module-path "\path\to\javafx-sdk-14.0.1\lib" --add-modules javafx.controls,javafx.fxml But I'm not sure how to add it to…
5
votes
1 answer

Passing JVM args to SBT

My SBT build is echoing: [error] Note: Some input files use unchecked or unsafe operations. [error] Note: Recompile with -Xlint:unchecked for details. How can I pass the -Xlint:unchecked argument to the javac process invoked by SBT?
Synesso
  • 37,610
  • 35
  • 136
  • 207
5
votes
1 answer

In Java 8 it is shown as none of the available 4 collectors (GC) are selected by default

I have a container running a Spring Boot microservice. I am using openjdk version "1.8.0_212" under OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r0) When I use -XX:+PrintFlagsFinal flag and print the JVM parameters I expected to see…
Suleka_28
  • 2,761
  • 4
  • 27
  • 43
5
votes
0 answers

Can the JVM be instructed to log full GC events only?

The flag -verbose:gc causes the JVM to log all garbage collection events to stdout. This contains useful information, but lives up to its name; a minor GC tends to occur every few seconds, so other information tends to get drowned in the flood. Is…
rwallace
  • 31,405
  • 40
  • 123
  • 242
5
votes
1 answer

jvm options -XX:+SafepointTimeout -XX:SafepointTimeoutDelay look don't work

I detected on a server long safepoints (>10sec!) in jvm safepoint.log: 6534.953: no vm operation [ 353 0 4 ] [ 0 0 14179 0 0 ] 0 7241.410: RevokeBias [ …
5
votes
2 answers

java OOM on creating 2 arrays of one billion ints

I am writing simple program in java to create 2 int arrays of 1 billion size. I ran this program with -Xms10G, i.e. 10GB of memory still I got OOM error. Below is the snippet. public class TestBigIntArraySize { public static int arraySize =…
Nitiraj
  • 614
  • 1
  • 4
  • 15
5
votes
3 answers

How can I pass Java command line options in a separate file?

Is there any way of launching Oracle's Java.exe and have it take its command line options from a text file on Windows? What I'd like to be able to do is something like this: java.exe -optionsFile=myOptionsFile.txt MyClass where 'myOptionsFile.txt'…
Mark Douglas
  • 345
  • 2
  • 11