java -jar myJar.jar
Run with JVM memory options
java -Xmx300m -Xms300m -myJar.jar
Run with JVM options for remote jconsole monitoring (java 1.6)
java -Dcom.sun.management.
-Xmx300m set starting heap size to 300 MB (use "k" for KB)
Note: in this example we disable authentication. Follow this link
http://docs.oracle.com/javase/6/docs/technotes/guides/management/agent.html#gdeup
to configure password and access files.
Note: in Ubuntu server we have to set the system's host name with machine ip
hostname [machineIp]
Full optional example
java -Xmx300m -Xms300m -Dcom.sun.management.
No comments:
Post a Comment