Questions tagged [java-opts]
80 questions
98
votes
7 answers
Duplicated Java runtime options : what is the order of preference?
Considering the following command line
java -Xms128m -Xms256m myapp.jar
Which settings will apply for JVM Minimum memory (Xms option) : 128m or 256m ?

fabien7474
- 16,300
- 22
- 96
- 124
28
votes
7 answers
how to set JAVA_OPTS for Tomcat in Windows?
I'm trying to set JAVA_OPTS for Tomcat on a Windows machine, but I keep getting an error if I add more than one variable.
For example, this works:
set JAVA_OPTS="-Xms512M"
But this does not:
set JAVA_OPTS="-Xms512M -Xmx1024M"
It results in the…

wannabeartist
- 2,753
- 6
- 36
- 49
16
votes
3 answers
Command to find out -Xms and -Xmx variable values for a given java process?
I have a java program, which i ran and figured out its process id with jps.
How can i see what is the value of -Xms and -Xmx variable for this java process ?

Adon Smith
- 1,849
- 7
- 19
- 19
14
votes
2 answers
org.apache.catalina.startup.Bootstrap on dock in Mac
Hope you can help me. I have a strange org.apache.catalina.startup.Bootstrap icon on my dock in mac. Im using the 10.7.2 version with Lion. I've use this: export JAVA_OPTS="-Djava.awt.headless=true" at the startup.sh and shutdown.sh but got the…

napstercake
- 1,815
- 6
- 32
- 57
13
votes
3 answers
How to convert String value to Custom Model Object in Java?
I have one Model Object. In which, i have multiple values. I want to store this Values in SQLite. But data is large, so i want to store Direct Model object
in databse. So i convert model Object to string and store it into database.
Now, Problem is…

Android Develeoper
- 411
- 1
- 6
- 24
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
8
votes
2 answers
Setting JAVA_OPTS and JAVA_TOOL_OPTIONS in Gradle
Running a large Gradle build (with JDK7) I receive two OutOfMemoryErrors:
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler…

user3105453
- 1,881
- 5
- 32
- 55
8
votes
2 answers
-->-- operator in Java
I was wondering, what does the -->-- operator do in Java?
For example, if I have the following code:
int x = 3;
int y = 3;
if (x -->-- y) {
return true;
}
This always returns true.
Thank you!

MarkusWillson
- 411
- 1
- 3
- 11
8
votes
3 answers
JAVA_OPTS set in catalina.sh not working for TOMCAT private instance
I have placed JVM options via JAVA_OPTS in catalina.sh in the catalina base. However, the system doesn't pick those options--I am trying to pass profiling information to set paths for project properties and logging files. I have to set the options…

user20507
- 93
- 1
- 1
- 6
6
votes
1 answer
How to interpret the output of -XX:CompileCommand="print Class::Method" in java
Here is an excerpt of the output that I get when I run the following command (40 is just an arg to the Fibonacci program) :
java -XX:+UnlockDiagnosticVMOptions -XX:CompileCommand="print Fibonacci::fibonacci" Fibonacci 40
Can someone explain the…

Cherry Vanc
- 781
- 1
- 4
- 19
6
votes
3 answers
IntelliJ set heap size over 4GB. How to?
I'm using IntelliJ 14.3 on x64 Java. Available memory: 10Gb (out of 16Gb total RAM)
(Basically set -Xmx8000M or greater)
The problem is I need more than 4Gb memory to use for an App.
I can not find any answer or solution to my problem and I've…

Adrian Pop
- 285
- 2
- 17
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
2 answers
Set JAVA_OPTS in JBOSS standalone.sh file
I have an app on jboss which logging through log4j. When I running my server through bat file (standalone.bat) logs work, but there is a problem under standalone.sh file. Here is how I set JAVA_OPTS in standalone.bat:
set "JAVA_OPTS=%JAVA_OPTS%…

caro2
- 155
- 1
- 4
- 13
5
votes
2 answers
Jenkins - java.lang.OutOfMemoryError: PermGen space -
Environment: Linux/Windows7, Java 1.6.0.03/37 or 1.7
I downloaded jenkins.war and after the initial setup using the following script/command, I downloaded some plugins(10-15) and tried to restart Jenkins, it worked. Then, I got some more plugins…

AKS
- 16,482
- 43
- 166
- 258
3
votes
1 answer
Setting java_opts to tomcat service from command line
I have a tomcat7 service running on windows,
Usually in order to configure the Java options I go to Tomcat 7.0\bin\tomcat7w.exe and there in java tab, in java options I print the definition I want, for example -javaagent:...
I want to do this…

user1197126
- 61
- 1
- 4