centOS5 ϵÄjava»·¾³ÅäÖÃ
µÚÒ»²½£º²é¿´Linux×Ô´øµÄJDKÊÇ·ñÒÑ°²×° £¨Ð¶ÔØcentOSÒÑ°²×°µÄ1.4£©
<1># rpm -qa|grep jdk ← ²é¿´jdkµÄÐÅÏ¢»òÖ±½ÓÖ´ÐÐ
»ò
# rpm -q jdk
»ò
# java -version
<2># rpm -qa | grep gcj ← È·ÈÏgcjµÄ°æ±¾ºÅ
<3># yum -y remove java-1.4.2-gcj-compat ← жÔØgcj
µÚ¶þ²½£º°²×°JDK
<1>´ÓSUNÏÂÔØjdk-1_5_0_14-linux-i586-rpm.bin»òjdk-1_5_0_14-linux-i586.bin
ÔÚ/usrÏÂн¨javaÎļþ¼Ð£¬½«°²×°°ü·ÅÔÚ/usr/javaĿ¼ÏÂ
# mkdir /usr/java
<2>°²×°JDK
# cd /usr/java
¢Ùjdk-1_5_0_14-linux-i586-rpm.binÎļþ°²×°
# chmod 777 jdk-1_5_0_14-linux-i586-rpm.bin ← ÐÞ¸ÄΪ¿ÉÖ´ÐÐ
# ./jdk-1_5_0_14-linux-i586-rpm.bin ← Ñ¡ÔñyesͬÒâÉÏÃæµÄÐÒé
# rpm -ivh jdk-1_5_0_14-linux-i586.rpm ← Ñ¡ÔñyesÖ±µ½°²×°Íê±Ï
¢Újdk-1_5_0_14-linux-i586.binÎļþ°²×°
# chmod a+x jdk-1_5_0_14-linux-i586.bin ← ʹµ±Ç°Óû§ÓµÓÐÖ´ÐÐȨÏÞ
# ./jdk-1_5_0_14-linux-i586.bin ← Ñ¡ÔñyesÖ±µ½°²×°Íê±Ï
µÚÈý²½£ºÅäÖû·¾³±äÁ¿
<1># vi /etc/profile
<2>ÔÚ×îºó¼ÓÈëÒÔϼ¸ÐУº
export JAVA_HOME=/usr/java/jdk1.6.0_10
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
<3># reboot ← ÖØÆô»úÆ÷ÅäÖÃÉúЧ
Ïà¹ØÎĵµ£º
ÔÚÉÏһƪÎÄÕ¡¶ÔÚJavaÖÐÀûÓö¯Ì¬´úÀíʵÏÖÊý¾Ý¿âÁ¬½ÓÓëÊÂÎñµÄ×Ô¶¯¹ÜÀí¡·½²ÊöÁËÈçºÎʹÓÃJava¶¯Ì¬´úÀí£¬µ«ÒªÇó±»´úÀí¶ÔÏóҪʵÏÖÒ»¸ö½Ó¿Ú£¬Èç¹û²»ÏëʵÏÖ½Ó¿ÚÔõô°ìÄØ£¿Ê¹ÓÿªÔ´µÄcglib¿ÉÒÔʵÏÖ¶ÔÒ»¸öÀà¶ÔÏóµÄ´úÀí£¬¶ø²»ÒªÇóʵÏÖ½Ó¿Ú¡£
cglib£¨Code Generation Library£©Äܹ»ÔÚ³ÌÐòÔË ......
³£¿´µ½ºÜ¶àÈËÌÖÂÛjavaÖйØÓÚStringµÄÎÊÌâ,ÎÒÒ²¾ÍÓеãÐËȤÁË,¼øÓÚÍøÉϺܶàÈËдµÄ¶¼²î±ðºÜ´ó,
ͬÑùµÄÎÊÌⶼÊDz»Í¬µÄ˵·¨,ÎÒºÜÃÔºý,»¨ÁËÒ»ÍíÉ϶ÁÁËJava Virtual Machine SpecificationºÍ
The Java Language SpecificationµÄһЩÕ½Ú,×öÁ˺ܶàÊÔÑé,×ܽáÁËһϹØÓÚStringµÄÄÚÈÝ,»¹
ÓкܶàÄÚÈÝÎÒÒ²²»È·¶¨,ÔÚÏÂÃæÒ²¶¼Ìá³öÀ´ÁË,Ï ......
ÔÎÄ: http://forum.javaeye.com/viewtopic.php?t=17912§Ö÷µÄÎÊÌâÎʵĺ¬º¬ºýºý:flyjie¸ø³öÁ˷dz£ÏêϸµÄ½âÊÍ£¬²»¹ý¾ÍÊÇûÓнâÊÍStringʵÀý»¯µÄÌØÊâ·½ÃæÒÔ¼°Intern()·½·¨µÄº¬Òå----------------------------------------------------------------------------------------------------------------------------------------- ......
ÔںܶàJavaÓ¦ÓÃÖÐÐèÒªÔÚ³ÌÐòÖе÷ÓÃJava±àÒëÆ÷À´±àÒëºÍÔËÐС£µ«ÔÚÔçÆڵİ汾ÖУ¨Java SE5¼°ÒÔÇ°°æ±¾£©ÖÐÖ»ÄÜͨ¹ýtools.jarÖеÄcom.sun.tools.javac°üÀ´µ÷ÓÃJava±àÒëÆ÷£¬µ«ÓÉÓÚtools.jar²»ÊDZê×¼µÄJava¿â£¬ÔÚʹÓÃʱ±ØÐëÒªÉèÖÃÕâ¸öjarµÄ·¾¶¡£¶øÔÚJava SE6ÖÐΪÎÒÃÇÌṩÁ˱ê×¼µÄ°üÀ´²Ù×÷Java±àÒëÆ÷£¬Õâ¾ÍÊÇjavax.tools°ü¡£Ê¹ÓÃÕ ......