LinuxÏÂJdkµÄ°²×°ºÍJava»·¾³±äÁ¿µÄÉèÖÃ
ÔÚlinuxϰ²×°JDKÈçÏ£º
µÚÒ»²½£º²é¿´Linux×Ô´øµÄJDKÊÇ·ñÒѰ²×°
£¨1£©²é¿´ÒѾ°²×°µÄjdk£º
# rpm -qa|grep jdk ← ²é¿´jdkµÄÐÅÏ¢»òÖ±½ÓÖ´ÐÐ
»ò
# rpm -q jdk
»ò
# java -version
£¨2£©rpm -qa|grep jdk Ð¶ÔØ£º
£¨3£©rpm -e rpm°üÃû£¨ÉÏÃæ¿´µ½µÄ£©Èô´æÔÚÒÀÀµ¹ØÏµ£¬ÏÈÐ¶ÔØÉϲãµÄ¡£
µÚ¶þ²½£º°²×°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£¨mkdir java –´ËĿ¼ÐèÒª´´½¨£©
¢Ùjdk-1_5_0_16-linux-i586-rpm.binÎļþ°²×°
# chmod 777 jdk-1_5_0_16-linux-i586-rpm.bin ← ÐÞ¸ÄΪ¿ÉÖ´ÐÐ
# ./jdk-1_5_0_16-linux-i586-rpm.bin ← Ñ¡ÔñyesͬÒâÉÏÃæµÄÐÒé
# rpm -ivh jdk-1_5_0_16-linux-i586.rpm ← Ñ¡ÔñyesÖ±µ½°²×°Íê±Ï
¢Újdk-1_5_0_16-linux-i586.binÎļþ°²×°
# chmod a+x jdk-1_5_0_16-linux-i586.bin ← ʹµ±Ç°Óû§ÓµÓÐÖ´ÐÐȨÏÞ
# ./jdk-1_5_0_16-linux-i586.bin ← Ñ¡ÔñyesÖ±µ½°²×°Íê±Ï
µÚÈý²½£ºÅäÖû·¾³±äÁ¿
<1># vi /etc/profile
<2>ÔÚ×îºó¼ÓÈëÒÔϼ¸ÐУº
export JAVA_HOME=/usr/java/jdk1.5.0_16
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># source /etc/profile Ö´ÐкóÉúЧ
µÚËIJ½£º²âÊÔJDK
#vi hello.java
public class hello {
public static void main(String args [ ])
{
System.out.println("Hello World!");
System.out.println("2009/2/19");
}
}
# javac hello.java
# java hello
Hello World!
2009/2/19
¿´µ½ÕâЩ¾Í´ú±í°²×°³É¹¦ÁË!
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/candle806/archive/2009/05/14/4187017.aspx
Ïà¹ØÎĵµ£º
ÓÐ600¸öÆ»¹û£¬10¸öºÐ×Ó£¬ÒªÇó°Ñ600¸öÆ»¹û·Ö×°µ½10¸öºÐ×ÓÀï¡£Èç¹ûÓÐÈËÀ´ÂòÆ»¹ûËæ±ã˵³öÒ»¸öÊý£¬Ö±½ÓÄÃÕâЩºÐ×Ó×éװһϾͿÉÒÔ¸øËû²»Óòð·ÖºÐ×Ó¡£ÇëÎÊÕâ10¸öºÐ×ÓÓ¦¸Ã·Ö±ð×°¶àÉÙÆ»¹û£¿
´úÂëÈçÏÂ
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
int box[] = ......
×Ô¼ºÊÕ¼¯µÄһЩjava´¦ÀíÀ࣬¹©ÒÔºó²éѯ
package com.tools;
import java.text.SimpleDateFormat;
import java.util.Date;
public class StringHandler {
/******************************
* ¹¦ÄÜ£º½«IPµØÖ·×ª»»Îª¶ÔÓ¦µÄÕûÊý
* ·µ»ØÀàÐÍ£ºlong
******************************/
public static long getI ......
µÚ5ÕÂͼÐνçÃæÉè¼Æ(Ò»)
(Ò»)¿Î³ÌÄÚÈÝ
5.1 ͼÐνçÃæÉè¼Æ»ù´¡
5.1.1 AWI’ºÍSwing
5.1.2×é¼þºÍÈÝÆ÷
5.1.3ʼþÇý¶¯³ÌÐòÉè¼Æ»ù´¡
5.2¿ò¼Ü´°¿Ú .
5.3±êÇ©¡¢°´Å¥ºÍ°´Å¥Ê¼þ
5.3.1 ±êÇ©
5.3.2°´Å¥ºÍ°´Å¥Ê¼þ´¦Àí
5.4Ãæ°å
5.4.1 JPanel
5.4.2 JScrollPane
5.5²¼¾ÖÉè¼Æ
5.5.1 FlowI.ayout²¼¾Ö
5.5.2 BorderI.a ......
µÚ10ÕÂ ÍøÂçÓëÊý¾Ý¿â±à³Ì»ù´¡
(Ò»)¿Î³ÌÄÚÈÝ
10.1 JavaÍøÂç±à³Ì»ù´¡
10.1.1 IPµØÖ·ºÍInetAddressÀà
10.1.2ͳһ×ÊÔ´¶¨Î»·ûURL
10.1.3¿Í»§»ú/·þÎñÆ÷ģʽ
l0.2 JavaÊý¾Ý¿â±à³Ì»ù´¡
10.2.1 Java³ÌÐòÓëÊý¾Ý¿âÁ¬½Ó
10.2.2¼¸¸öÖØÒªµÄÀàºÍ½Ó¿Ú
10.2.3Êý¾Ý¿â²éѯ
10.2.4Êý¾Ý¿â¸üÐÂ
(¶þ)ѧϰĿµÄÓëÒªÇó
±¾Õ½éÉÜJavaÍøÂç± ......
......