Java»ñÈ¡²Ù×÷ϵͳÐÅÏ¢
SAMPLE£º
import java.util.Properties;
Properties props=System.getProperties(); //»ñµÃϵͳÊôÐÔ¼¯
String osName = props.getProperty("os.name"); //²Ù×÷ϵͳÃû³Æ
String osArch = props.getProperty("os.arch"); //²Ù×÷ϵͳ¹¹¼Ü
String osVersion = props.getProperty("os.version"); //²Ù×÷ϵͳ°æ±¾
·½Ê½£º
public static String getProperty(String key)
¼üÏà¹ØÖµµÄÃèÊö
java.version
Java ÔËÐÐʱ»·¾³°æ±¾
java.vendor
Java ÔËÐÐʱ»·¾³¹©Ó¦ÉÌ
java.vendor.url
Java ¹©Ó¦ÉÌµÄ URL
java.home
Java °²×°Ä¿Â¼
java.vm.specification.version
Java ÐéÄâ»ú¹æ·¶°æ±¾
java.vm.specification.vendor
Java ÐéÄâ»ú¹æ·¶¹©Ó¦ÉÌ
java.vm.specification.name
Java ÐéÄâ»ú¹æ·¶Ãû³Æ
java.vm.version
Java ÐéÄâ»úʵÏÖ°æ±¾
java.vm.vendor
Java ÐéÄâ»úʵÏÖ¹©Ó¦ÉÌ
java.vm.name
Java ÐéÄâ»úʵÏÖÃû³Æ
java.specification.version
Java ÔËÐÐʱ»·¾³¹æ·¶°æ±¾
java.specification.vendor
Java ÔËÐÐʱ»·¾³¹æ·¶¹©Ó¦ÉÌ
java.specification.name
Java ÔËÐÐʱ»·¾³¹æ·¶Ãû³Æ
java.class.version
Java Àà¸ñʽ°æ±¾ºÅ
java.class.path
Java Àà·¾¶
java.library.path
¼ÓÔØ¿âʱËÑË÷µÄ·¾¶Áбí
java.io.tmpdir
ĬÈϵÄÁÙʱÎļþ·¾¶
java.compiler
ҪʹÓÃµÄ JIT ±àÒëÆ÷µÄÃû³Æ
java.ext.dirs
Ò»¸ö»ò¶à¸öÀ©Õ¹Ä¿Â¼µÄ·¾¶
os.name
²Ù×÷ϵͳµÄÃû³Æ
os.arch
²Ù×÷ϵͳµÄ¼Ü¹¹
os.version
²Ù×÷ϵͳµÄ°æ±¾
file.separator
Îļþ·Ö¸ô·û£¨ÔÚ UNIX ϵͳÖÐÊÇ“/”£©
path.separator
·¾¶·Ö¸ô·û£¨ÔÚ UNIX ϵͳÖÐÊÇ“:”£©
line.separator
Ðзָô·û£¨ÔÚ UNIX ϵͳÖÐÊÇ“/n”£©
user.name
Óû§µÄÕË»§Ãû³Æ
user.home
Óû§µÄÖ÷Ŀ¼
user.dir
Óû§µÄµ±Ç°¹¤×÷Ŀ¼
Ïà¹ØÎĵµ£º
ÀàµÄ³õʼ»¯ºÍ¶ÔÏó³õʼ»¯ÊÇ JVM ¹ÜÀíµÄÀàÐÍÉúÃüÖÜÆÚÖзdz£ÖØÒªµÄÁ½¸ö»·½Ú£¬Google ÁËÒ»±éÍøÂ磬ÓйØÀà×°ÔØ»úÖƵÄÎÄÕµ¹ÊDz»ÉÙ£¬È»¶øÀà³õʼ»¯ºÍ¶ÔÏó³õʼ»¯µÄÎÄÕ²¢²»¶à£¬ÌرðÊÇ´Ó×Ö½ÚÂëºÍ JVM ²ã´ÎÀ´·ÖÎöµÄÎÄÕ¸üÊÇÏÊÓÐËù¼û¡£
±¾ÎÄÖ÷Òª¶ÔÀàºÍ¶ÔÏó³õʼ»¯È«¹ý³Ì½øÐзÖÎö£¬Í¨¹ýÒ»¸öʵ¼ÊÎÊÌâÒýÈ룬½«Ô´´úÂëת»»³É JVM ×Ö½ÚÂëºó£¬ ......
String fm = "46+5*(120-37)";
String[] item = fm.split("[+-/*/()]");
for(String it: item){
System.out.print(it+" ");
}
ÕýÔò±í´ïʽÖРתÒ壺 * ==> /* ......
java²»ÔÊÐí¶àÖؼ̳У¬Ò²¾ÍÊÇ˵һ¸ö×ÓÀàÖ»ÄÜÓÐÒ»¸ö¸¸À࣬
Son extends FatherA,FatherB ÊÇ´íÎóµÄ
ΪÁËÃÖ²¹Õâµã²»×㣬javaÔÊÐíʵÏÖ¶à¸ö½Ó¿Ú£¬
½Ó¿Ú¾ÍÊǸø³öһЩûÓÐÄÚÈݵķ½·¨£¬ÀàËÆÓÚC++ÖеÄÐéÀà¡£µ½¾ßÌåÓõÄʱºòÔÙÓÉÓõķ½·¨×Ô¼º¶¨ÒåÄÚÈÝ£¬Òª×¢ÒâµÄÊÇÏëÓýӿڱØÐëʵÏÖ½Ó¿ÚµÄËù
Óз½·¨¡£
ÆäʵÊÇÒòΪjava²» ......
JavaÊäÈëÊý¾ÝÁ÷
ÔÚJavaÖУ¬ÎÒÃÇ°ÑÄܹ»¶ÁÈ¡Ò»¸ö×Ö½ÚÐòÁеĶÔÏó³Æ×÷Ò»¸öJavaÊäÈëÊý¾ÝÁ÷;¶øÎÒÃǰѹ»Ð´Ò»¸ö×Ö½ÚÐòÁгÆ×÷Ò»¸öÊä³öÁ÷¡£ËüÃÇ·Ö±ðÓɳéÏóÀà InputStreamºÍOutputStreamÀà±íʾ¡£ÒòΪÃæÏò×Ö½ÚµÄÁ÷²»·½±ãÓÃÀ´´¦Àí´æ´¢ÎªUnicode£¨Ã¿¸ö×Ö·ûʹÓÃÁ½¸ö×Ö½Ú)µÄÐÅÏ¢¡£ËùÒÔJava ÒýÈëÁËÓÃÀ´´¦ÀíUnicode×Ö·ûµÄÀà²ã´Î£¬ÕâЩÀàÅÉÉú× ......
1£©¸ÅÄ
ÊÇÔÚÔËÐÐ״̬ÖУ¬¶ÔÓÚÈÎÒâÒ»¸öÀ࣬¶¼Äܹ»ÖªµÀÕâ¸öÀàµÄËùÓÐÊôÐԺͷ½·¨£»¶ÔÓÚÈÎÒâÒ»¸ö¶ÔÏ󣬶¼Äܹ»µ÷ÓÃËüµÄÈÎÒâÒ»¸ö·½·¨£»ÕâÖÖ¶¯Ì¬»ñÈ¡µÄÐÅÏ¢ÒÔ¼°¶¯Ì¬µ÷ÓöÔÏóµÄ·½·¨µÄ¹¦ÄܳÆΪjavaÓïÑԵķ´Éä»úÖÆ¡£
2£©¹¦ÄÜ£º
ÔÚÔËÐÐʱÅжÏÈÎÒâÒ»¸ö¶ÔÏóËùÊôµÄÀࣻ
ÔÚÔËÐÐʱ ......