javaÖÐÈçºÎ»ñµÃ²Ù×÷ϵͳÏÂÓû§Ä¿Â¼
String usrHome = System.getProperty("user.home");
ÏÂÃæÊÇSystemµÄ²ÎÊýÁбí
Key Meaning
------------------- ------------------------------
"file.separator" File separator (e.g., "/")
"java.class.path" Java classpath
"java.class.version" Java class version number
"java.home" Java installation directory
"java.vendor" Java vendor-specific string
"java.vendor.url" Java vendor URL
"java.version" Java version number
"line.separator" Line separator
"os.arch" Operating system architecture
"os.name" Operating system name
"path.separator" Path separator (e.g., ":")
"user.dir" User's current working directory
"user.home" User home directory
"user.name" User
Ïà¹ØÎĵµ£º
Ó¦¸Ã¾ÍÊÇ°Ñjava ÀïÃæµÄ×é¼þ¸ãÃ÷°×
Servlet
ServletÊÇÒ»ÖÖ»ùÓÚwebµÄJava×é¼þ£¬ËüÓÉÈÝÆ÷¹ÜÀí£¬²¢¶¯Ì¬Éú³ÉÆäÄÚÈÝ
ÔòûÓÐͼÐνçÃ棬ÔËÐÐÔÚ·þÎñÆ÷¶Ë
ËüÃǶ¼ÓÐÒ»¸öÉú´æÖÜÆÚ£¬°üº¬init()ºÍdestroy()·½·¨
²»ÊǶÀÁ¢µÄÓ¦ÓóÌÐò£¬Ã»ÓÐmain()·½·¨
Ó봫ͳµÄCGIºÍÐí¶àÆäËûÀàËÆCGIµÄ¼¼ÊõÏà±È£¬Java Servlet¾ßÓиü¸ßµÄЧÂÊ£¬¸ ......
Worker Thread PatternµÄ²ÎÓëÕߣº
1. Client£¨Î¯ÍÐÈË£©²ÎÓëÕß
Client²ÎÓëÕ߻ὨÁ¢Request²ÎÓëÕߣ¬²¢´«¸øChannel²ÎÓëÕß¡£
2. Channel£¨Í¨Â·£©²ÎÓëÕß
Channel²ÎÓëÕß»á´ÓClient²ÎÓëÕß»ñÈ¡Request²ÎÓëÕߣ¬´«µÝ¸øWorker²ÎÓëÕß¡£
3. Worker£¨¹¤ÈË£©²ÎÓëÕß
Worker ......
×î½ü³õ²½½Ó´¥ÁËÏÂJava¼ÓÃܺÍÊý×ÖÇ©ÃûµÄÏà¹ØÄÚÈÝ£¬ÎÒѧϰµÄ¹ý³Ì´ó¸Å·ÖÎå²½£º
1£©ÏûÏ¢ÕªÒª
2£©Ë½Ô¿¼ÓÃÜ
3£©¹«Ô¿¼ÓÃÜ
4£©Êý×ÖÇ©Ãû
5£©Êý×ÖÖ¤Êé
ÏÂÃæµÄ´úÂëÊǵÚËIJ¿·Ö£ºÊý×ÖÇ©Ãû
Ï£ÍûÄÜΪ¸Õ¸Õ½Ó´¥Õâ¸öµÄÅóÓÑÃÇÊ¡µãÊ package security;
import java.security.Signature;
import java.security.KeyPairGenerator ......
ÓÃÃüÁî whereis java¾Í¿ÉÒÔ¿´µ½ÁË
eg:
-bash-3.1$ whereis java
java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /opt/jdk1.6.0_01/bin/java
Èç¹û½ö½öÏëÖªµÀjavaÖ´Ðз¾¶ÔÚÄÇÀïµÄ»° ÓÃwhich java¾Í¿ÉÒÔÁË
eg:
-bash-3.1$ which java
/usr/bin/java ......
ÈçºÎÍ£Ö¹javaµÄÏß³ÌÒ»Ö±ÊÇÒ»¸öÀ§ÄÕÎÒÃÇ¿ª·¢¶àÏ̳߳ÌÐòµÄÒ»¸öÎÊÌâ¡£Õâ¸öÎÊÌâ×îÖÕÔÚJava5µÄjava.util.concurrentÖеõ½Á˻شð£ºÊ¹ÓÃinterrupt()£¬ÈÃÏß³ÌÔÚrun·½·¨ÖÐÍ£Ö¹¡£ ¼ò½é ÔÚJavaµÄ¶àÏ̱߳à³ÌÖУ¬java.lang.ThreadÀàÐÍ°üº¬ÁËһЩÁеķ½·¨start(), stop(), stop(Throwable) and suspend(), destroy() and resume()¡£Í¨¹ ......