Reputation: 8280
On a server where I work is a JBoss instance, which has the following command line:
/usr/java/jdk1.6.0_31/bin/java -Dcom.sun.management.jmxremote -Dprogram.name=run.sh -server -Xms464m -Xmx464m -XX:MaxPermSize=128m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.net.inetaddr.ttl=0 -Dcom.sun.management.jmxremote -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl -Djboss.platform.mbeanserver -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=20071 -Djava.endorsed.dirs=/opt/jboss/lib/endorsed -classpath /opt/jboss/bin/run.jar:/usr/java/jdk1.6.0_31/lib/tools.jar org.jboss.Main -P /opt/jboss/server/default/site-deploy/example.com/boot-1.properties -c default
I have a few questions:
1. I understand that the -D
option sets the named property, e.g. -Dsun.rmi.dgc.server.gcInterval=3600000
sets the property sun.rmi.dgc.server.gcInterval
to the value 3600000
. What about -D
options that have no equals sign, like -Dcom.sun.management.jmxremote
? What is the value of com.sun.management.jmxremote
?
2. I can't find ANY documentation explaining what the -P
or -c
options do. Neither java -version
or man java
mentions them. My guess is that -P
means "load the properties from the specified file." I have no idea what -c
does.
3. The token org.jboss.Main
doesn't seem to be part of the preceding -classpath
option. Is it the name of the class that Java is telling it to invoke, e.g. how java Foo
would invoke a class called Foo
?
Upvotes: 1
Views: 549
Reputation: 7921
The following link documents all of the options to the jboss run.sh script:
Chapter 5. Starting and Stopping JBoss
usage: run.sh [options]
-h, --help Show this help message
-V, --version Show version information
-- Stop processing options
-D<name>[=<value>] Set a system property
-d, --bootdir=<dir> Set the boot patch directory; Must be absolute or url
-p, --patchdir=<dir> Set the patch directory; Must be absolute or url
-n, --netboot=<url> Boot from net with the given url as base
-c, --configuration=<name> Set the server configuration name
-B, --bootlib=<filename> Add an extra library to the front bootclasspath
-L, --library=<filename> Add an extra library to the loaders classpath
-C, --classpath=<url> Add an extra url to the loaders classpath
-P, --properties=<url> Load system properties from the given url
-b, --host=<host or ip> Bind address for all JBoss services
-g, --partition=<name> HA Partition name (default=DefaultDomain)
-u, --udp=<ip> UDP multicast address
-l, --log=<log4j|jdk> Specify the logger plugin type
Upvotes: 0
Reputation: 240928
/usr/java/jdk1.6.0_31/bin/java -Dcom.sun.management.jmxremote -Dprogram.name=run.sh -server -Xms464m -Xmx464m -XX:MaxPermSize=128m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.net.inetaddr.ttl=0 -Dcom.sun.management.jmxremote -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl -Djboss.platform.mbeanserver -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=20071 -Djava.endorsed.dirs=/opt/jboss/lib/endorsed -classpath /opt/jboss/bin/run.jar:/usr/java/jdk1.6.0_31/lib/tools.jar org.jboss.Main -P /opt/jboss/server/default/site-deploy/example.com/boot-1.properties -c default
1 System property without value means that system property is present, and value is empty string ""
2 those are the command line argument to jboss's Main class
3 that class is coming from one of those jar, open run.jar
and validate
Upvotes: 1