Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is It same mean "JAVA_ARGS" and "JAVA OPTS"

I want to configure java PermGen option for jenkins.

in search web, I found article which write:

set java_opts JAVA_OPTS="-server -XX:PermSize=128M -XX:MaxPermSize=256m" 

other article says:

set java args JAVA_ARGS="-XX:MaxPermSize=512m -Xms512m -Xmx1024m"

Are each options valid? if not, what is the difference?

like image 931
dmnlk Avatar asked Sep 12 '26 00:09

dmnlk


1 Answers

Java applications are usually called by a startup script with a command like java $JAVA_ARGS $JAVA_OPTS -jar application.jar

Both variables are JVM options and they're both given to the application.

It is (unfortunately) not uncommon to have a list of 10 general options + 10 optimizations options so they're split across 2 variables for readability.

PermGen settings are considered garbage collector optimizations. They go in JAVA_OPTS. You should check that the jenkins script is using both variables as expected.

like image 59
user5994461 Avatar answered Sep 13 '26 23:09

user5994461



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!