ubuntu9.10ÅäÖÃjava»·¾³
ÔÚ9.10ÖпÉÒÔÔÚÖÕ¶ËÖÐʹÓÃapt-getÃüÁî½øÐа²×°¡£ÕâÖÖ·½·¨±È½Ï¼òµ¥¡£²»¹ý¸öÈËÈÏΪ ¶ÔÓÚ³õѧÕߣ¬»¹ÊÇÊÖ¶¯°²×°±È½ÏºÃ£¬¿ÉÒÔÊìϤºÜ¶à¶«Î÷¡£
1.ÏÂÔØjdkºÍjre
µÇ¼sunÍøÕ¾http://java.sun.com/javase/downloads/index.jsp£¬ÏÂÔØjdk-6u18-linux-i586.binºÍjre-6u18-linux-i586.bin¡£×¢ÒâÔÚ¹ÙÍøÖÐ
ÓÐÁ½¸öÏÂÔصØÖ·£¬Ò»¸öÊÇjdk-6u18-linux- i586.bin(jre-6u18-linux-i586.bin)£¬»¹ÓÐÒ»¸öÊÇjdk-6u18-linux-i586-rpm.bin(jre-6u18-linux
-i586.rpm.bin)¡£ubuntuÖÐÒ»¶¨ÒªÏÂÔØjdk-6u18-linux- i586.bin(jre-6u18-linux-i586.bin)£¬jdk-6u18-linux-i586-rpm.bin(jre-6u18-
linux-i586.rpm.bin)ÔÚubuntuÖÐÎÞ·¨°²×°¡£¾Ý˵ºÃÏñҪת»»£¬¶ÔÓÚÎÒÕâ¸ö²ËÄñ»¹Åª²»Ã÷°×¡£jdkºÍjreµÄ°²×°¹ý³ÌÏàͬ£¬ÏÂÃæ½ö¾Íjdk¼ÓÒÔ˵Ã÷¡£
2.¸´ÖÆ°²×°Îļþ
½«ÏÂÔصÄÎļþ¸´ÖƵ½ÄãÒª°²×°µÄÎļþ¼Ð¡£±¾ÎÄÖÐjdkºÍjre°²×°ÔÚ/usr/javaÖС£
mkdir /usr/java
cp /home/hyh/software/jdk-6u18-linux-i586.bin /usr/java
Ãû×ֱȽϳ¤£¬¿ÉÒÔÓÃtab²¹È«
3.¸ü¸ÄÎļþȨÏÞΪ¿ÉÖ´ÐÐ,°²×°
sudo chmod u+x jdk-6u18-linux-i586.bin
./jdk-6u17-linux-i586.bin /usr/java
×¢Ò⣺ÓÐÒ»¸öÓ¢Îĵġ£È»ºóһ·»Ø³µ£¬Ö±µ½Ñ¯ÎÊÊÇ·ñ°²×°£¬ÊäÈëyes»Ø³µ
4.°²×°½áÊøÅäÖû·¾³±äÁ¿
ÐÞ¸ÄËùÓÐÓû§µÄ»·¾³±äÁ¿
sudo gedit /etc/profile
ÔÚÎļþ×îºóÌí¼Ó
#set java environment
export JAVA_HOME=/usr/java
export CLASSPATH=$CLASSPATH:$JAVA_HOME/jdk1.6.0_18/lib:$JAVA_HOME/jre1.6.0.18/lib
export PATH=$PATH:$JAVA_HOME/jdk1.6.0_18/bin:$JAVA_HOME/jre1.6.0_18/bin
5.ÖØÐÂÆô¶¯¼ÆËã»ú£¬ÓÃhelloworld²âÊÔ
¿ÉÒÔ±àдһ¸ö¼òµ¥µÄhelloworld.java²âÊÔ¡£±àÒë(javac *.java)ºÍÔËÐз½·¨(java *£¬×¢ÒâûÓÐ.class)ºÍwindowsÖÐÔÚÃüÁîÌáʾÐÐÖÐʹÓÃÒ»Ñù¡£
Ò²¿ÉÒÔÔÚterminalʹÓÃjava -version¡££¨Õâ½ö˵Ã÷jre°²×°³É¹¦£¬ÒòΪjavacÊÇjdkµÄbinĿ¼Ïµġ££©
ÏÔʾÈçÏÂÐÅÏ¢£º³É¹¦°²×°
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
PS:Èç¹ûÄãÒÔÇ°×°¹ýjavaµÄ¾É°æ±¾£¬ÄÇô¿ÉÄÜÏÔʾµÄ°æ±¾²»ÊÇ×îеģ¬ÐèÒª½«ÔÀ´µÄ°æ±¾Ìæ»»µô¡£¿ÉÈçϽâ¾ö£º
ÊäÈ룺update-alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_17/bin/java 300
update-alternatives --install /usr/bin/j
Ïà¹ØÎĵµ£º
JavaÖжÑÕ»µÄ¸ÅÄȻÊÇÂß¼Éϵģ¬ÔÚÍêÈ«·ûºÏJava¹æ·¶µÄJava´¦ÀíÆ÷ÃæÊÀ֮ǰ£¬ËùÓÐJavaÐéÄâ»úÌṩµÄÄÚÈݶ¼ÊÇÓÉÈí¼þÄ£Äâ³öÀ´µÄ¡£
ʲô½Ð¶Ñ£¿ÄãÓÃÊ®¼¸¸öÂ齫ÅÆÊúÖ±µþ³ÉÒ»ÞûÕâ½Ð¶Ñ£¬Äã¿ÉÒÔ´ÓÉÏÃæ¡¢ÏÂÃæ¡¢ÖмäÈÎÒâ³é³öÒ»ÕÅÅÆ£¬Ò²¿ÉÒÔÈÎÒâ²åÈëÒ»ÕÅ¡£
ʲô½ÐÕ»£¿AK-47µÄµ¯Ï»¾ÍÊÇÒ»¸öÕ»£¬ÔÚÉÏÃæµÄ×Óµ¯Ã»±»È¡³ö֮ǰ£¬ÄãÎÞ·¨È¡³öÏÂà ......
1¡¢commons-math/commons-lang-math
ÒÔÉÏÁ½¸ö°üÊÇapacheϵģ¬Ç°Õ߱ȺóÕߵŦÄÜÇ¿´ó£¬ºóÕßÓеŦÄÜÇ°¶¼ÓУ¬ºóÕßÖ÷Òª½â¾öƽʱ³ÌÐòÖеÄһЩ»ù±¾µÄÊýѧ¼ÆË㣬Ö÷ÒªÊÇ·¶Î§Åжϣ¨*Range£©,Ëæ»úÊýÉú³É£¨JVMRandom,RandomUtils£©£¬·ÖÊý´¦Àí£¨Fraction£©£¬Êý×Öת»¯¡¢´óСÅжϣ¨NumberUtils£©µÈ¡£Ç°Õß¿ÉÒÔ´¦Àí¸ü¸´ÔÓµÄÊý¾Ý·Ö ......
дһ¸öApplication³ÌÐò£¬½çÃæÉÏ·ÅÖÃÁ½¸öTextfield,Ò»¸öButton,Óû§ÔÚµÚÒ»¸öTextfieldÖÐÊäÈëÐÕÃûºóÇûسµ¼ü¿ÉÒÔÔÚµÚ¶þ¸öTextfieldÖÐÊä³ö£º“Welcome you,ÓÃÐÕÃû”¡£Óû§µã»÷Button¿ÉÒÔÍ˳ö³ÌÐò¡£
°ï°ïæ°É£¡¼òµ¥µÄJavaÓïÑÔ¡£Ð»Ð»À²£¡ ......
£¨
1
£©
+=
:sum += 1;
Ï൱ÓÚ
sum = sum + 1;
£¨
2
£©
++ --
:i++ i
¼Ó
1, i-- i
¼õ
1, ++
»ò
—
·ÅÔÚÊýÖµºó£¬±íʾִÐÐÔËËãºó¼Ó£¨¼õ£©
1
£¬·´ÕýÊýֵǰ±íʾִÐÐÔËËãÇ°¼Ó£¨¼õ£©
1
£¨
3
£©
?
: :
int n = a<10?1:2
±íʾÈç¹û
a
СÓÚ
10
Ôò
n
µÈÓÚ
1
·ñÔòµÈÓÚ
2
£¨
4
......
.»ù±¾¸ÅÄîµÄÀí½â
¾ø¶Ô·¾¶£º¾ø¶Ô·¾¶¾ÍÊÇÄãµÄÖ÷Ò³ÉϵÄÎļþ»òĿ¼ÔÚÓ²ÅÌÉÏÕæÕýµÄ·¾¶£¬(URLºÍÎïÀí·¾¶)ÀýÈ磺
C:xyz est.txt ´ú±íÁËtest.txtÎļþµÄ¾ø¶Ô·¾¶¡£http://www.sun.com/index.htmÒ²´ú±íÁËÒ»¸öURL¾ø¶Ô·¾¶¡£
Ïà¶Ô·¾¶£ºÏà¶ÔÓëij¸ö»ù׼Ŀ¼µÄ·¾¶¡£°üº¬WebµÄÏà¶Ô·¾¶£¨HTMLÖеÄÏà¶ÔĿ¼£©£¬ÀýÈ磺ÔÚ
ServletÖ ......