Java options Some Useful XX Options
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp
Categories of Java HotSpot VM Options
Standard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages for Windows
, Solaris
and Linux
. This document deals exclusively with non-standard options recognized by the Java HotSpot VM:
Options that begin with -X
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.
Options that are specified with -XX
are not stable and are not recommended for casual use. These options are subject to change without notice.
Some Useful -XX Options
Default values are listed for Java SE 6 for Solaris Sparc with -server.
Some options may vary per architecture/OS/JVM version. Platforms with a
differing default value are listed in the description.
Boolean options are turned on with -XX:+<option>
and turned off with -XX:-<option>
.
Numeric options are set with -XX:<option>=<number>
.
Numbers can include 'm' or 'M' for megabytes, 'k' or 'K' for kilobytes,
and 'g' or 'G' for gigabytes (for example, 32k is the same as 32768).
String options are set with -XX:<option>=<string>
, are usually used to specify a file, a path, or a list of commands
Flags marked as manageable
are dynamically writeable
through the JDK management interface
(com.sun.management.HotSpotDiagnosticMXBean API) and also through
JConsole. In Monitoring and Managing Java SE 6 Platform Applications
, Figure 3 shows an example. The manageable flags can also be set through jinfo -flag
.
The options below are loosely grouped into three categories.
Behavioral options
change the basic behavior of the VM.
Performance tuning
options are knobs which can be used to tune VM performance.
Debugging options
generally enable tracing, printing, or output of VM information.
B
Ïà¹ØÎĵµ£º
ÃæÏò¶ÔÏó±à³ÌÓÐÈý¸öÌØÕ÷£¬¼´·â×°¡¢¼Ì³ÐºÍ¶à̬¡£
·â×°Òþ²ØÁËÀàµÄÄÚ²¿ÊµÏÖ»úÖÆ£¬´Ó¶ø¿ÉÒÔÔÚ²»Ó°ÏìʹÓÃÕßµÄǰÌáϸıäÀàµÄÄÚ²¿½á¹¹£¬Í¬Ê±±£»¤ÁËÊý¾Ý¡£
¼Ì³ÐÊÇΪÁËÖØÓø¸Àà´úÂ룬ͬʱΪʵÏÖ¶à̬ÐÔ×÷×¼±¸¡£ÄÇôʲôÊǶàÌ¬ÄØ£¿
·½·¨µÄÖØÐ´ ......
ÄãÒ²ÐíÊÇÒ»¸ö¹¤³Ìʦ£¬ÕýÔÚʹÓÃEJB¡¢Struts¡¢Hibernate¡¢SpringµÈ¸÷ÖÖ¹úÍâÁ÷ÐеĿò¼Ü¿ª·¢ÄãµÄϵͳÖеĸ÷¸ö²¿·Ö£¬ËüÃÇÖ®¼ä¿¿²»Í¬µÄÅäÖÃÎļþ¡¢½Ó¿Ú¡¢·þÎñÁ¬½ÓÔÚÒ»Æð£¬ÎªÕâЩ½Ó¿Ú¡¢ÅäÖᢷþÎñµÄ±àд¡¢µ÷Óã¬Í·ÌÛÂð£¿
ÄãÒ²ÐíÊÇÒ»¸öPM£¬ ÕýÔÚΪÄãµÄÏîÄ¿²ÉÓÃʲô¿ò¼Ü¡¢ÈçºÎ·Ö×é¡¢ÈçºÎе÷¡¢¸÷ÖÖ¿ò¼ÜµÄÓÅÁÓ×öÆÀ¹À¡¢²âÊÔ£¬ÎªÄãµÄÓ¦Ó ......
½ñÌìÓöµ½Ò»¸öºÜ¹îÒìµÄbug£¬µ÷ÊÔÁ˰ëÌìҲûÓп´³öÀ´ÓÐʲôÎÊÌ⣬³éÏóһϴúÂëÈçÏ£º
public class Instance
{
public static Instance instance = new Instance();
public static Map<String, String> map = new HashMap<String, String>();
public static Instance instance()
{
r ......
×÷ÕߣºÐûÕ×Åô
------------------------------------------------------------------------------------------------------------------------------------------
¹¤×÷µÚÒ»²½£ºÊìϤMyEclipseµÄ»·¾³ÒÔ¼°Ö÷Òª¹¦ÄÜ¡£
¹¤×÷µÚ¶þ²½£º½¨Á¢Êý¾Ý¿âÁ¬½Ó
Êý¾Ý¿â£ºMySQL
1¡¢MySQLµÄÅäÖÃÓëÎÊÌâ½â¾ö
Ïê¼ûÎ ......
Á˽âȱʡLocaleÊÇÓɲÙ×÷ϵͳ¾ö¶¨µÄ£¬LocaleÊÇÓÉÓïÑԺ͹ú¼Ò´úÂë×é³É
¹ú¼Ê»¯×ÊÔ´ÎļþÓÉbaseName+locale×é³É£¬È磺MessageBundle_en_US.properties£¨baseNameÊÇÈÎÒâºÏ·¨µÄÎļþÃû£©
native2asciiÃüÁîµÄλÖúÍÓ÷¨
λÖãºJAVA_HOME/bin
ʹÓÃnative2ascii.exe o.properties MessagesBundle_zh_CN.properties ÃüÁî¶ÔÕû¸öÎļþ ......