RedHat AS4ÅäÖÃJava»·¾³
µ½SunÍøÕ¾ÏÂÔØ×Ô½âѹ°²×°°üjdk-xxxx.bin
°²×°£º
[root@RHEL4 JDK-1.5.0.06]# chmod +x jdk-xxxx.bin
[root@RHEL4 JDK-1.5.0.06]# ./jdk-xxxx.bin
Ñ¡Ôñ°²×°Î»Öã¬
J2SDK°²×°Ä¿Â¼£º /usr/local/jdk
ÅäÖÃJava»·¾³±äÁ¿£º
ÔÚ ~/.bash_profile Àï¼ÓÈëÏÂÁм¸Ðл·¾³±äÁ¿¼´¿É£º
export JAVA_HOME=/usr/local/jdk
export PATH=$PATH:$JAVA_HOME/bin
export MANPATH=$JAVA_HOME/man
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar
È»ºóÖ´ÐÐÏÂÁвÙ×÷£º
mv /usr/bin/java /usr/bin/java.bak
ln -s /usr/local/jdk/bin/java /usr/bin/java
×¢Ïúµ±Ç°Óû§£¬ÖØеǼ¡£
ÏÂÃæÑéÖ¤Java»·¾³±äÁ¿ÊÇ·ñÉúЧ£º
[root@RHEL4 ~]# echo $JAVA_HOME
/usr/local/jdk
[root@RHEL4 ~]# echo $CLASSPATH
.:/usr/local/jdk/lib/dt.jar:/usr/local/jdk/lib/tools.jar:/usr/local/jdk/jre/lib/rt.jar
[root@RHEL4 ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/jdk/bin:/home/lwg/bin:/usr/local/jdk/bin:/usr/local/jdk/bin
[root@RHEL4 ~]# java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
[root@RHEL4 ~]#
»·¾³±äÁ¿ÉèÖÃOK£¡
ÏÂÃæ²âÊÔJDK£º
[root@RHEL4 temp]# vim test.java
class test{
public static void main(String[] args){
System.out.println("Hello World!");
}
}
±£´æ£¬Í˳ö£¬È»ºó±àÒë¡¢Ö´ÐУº
[root@RHEL4 temp]javac test.java
[root@RHEL4 temp]java test
Hello World!
ºÃÁË£¬JDK¹¤×÷Õý³££¡
Èç¹ûҪʹij¸öÓû§¾ßÓÐÔËÐÐjavaÃüÁîµÄȨÏÞ£¬Ö»ÒªÐÞ¸ÄÆäbash³õʼ»¯Îļþ.bashrc»òÕß.bash_profile¼´¿É¡£
from:http://blog.chinaunix.net/u/17301/showart_231344.html
Linux ÏÂJDK°²×°Îĵµ
1.JDKÏÂÔØ:http://java.sun.com
ÏÂÔØ×Ô½âѹ°ü:jdk-1_5_0_06-linux-i586.bin
#sh jdk-1_5_0_06-linux-i586.bin °´ÌáʾѡÔñyes.
»òÕß
#chmod 755 jdk-1_5_0_06-linux-i586.bin
#./jdk-1_5_0_06-linux-i586.bin ½âѹºó
#mv jdk1.5.0_06 /usr/local/
µ½´ËJDKÒѾ°²×°Íê³É
2..ɾ³ýÔÓеÄJDK
Ê×ÏÈÔËÐУ»
Ïà¹ØÎĵµ£º
ÔÚJavaÖз½·¨²ÎÊýµÄ´«µÝ£¬¶¼ÊÇÖµ´«µÝ£¬¶ÔÏó´«µÝÊǵØÖ· £¬»ù±¾Êý¾ÝÀàÐÍ´«µÝµÄÊÇÖµ¡£µØÖ·ºÍÖµ¶¼Öµ¡£
ÏÂÃæÒÔÒ»¸öÀý×ÓÀ´¿´ÄÚ´æÖеÄÊý¾Ý±ä»¯Çé¿ö
public class Test{
private String name;
public String getName(){
&nbs ......
´Ó×î³£¹æµÄ·Ö²ã½á¹¹À´Ëµ£¬ÏµÍ³²ã´Î´ÓÉϵ½ÏÂÒÀ´ÎΪ£º
±íÏֲ㣺Ö÷ÒªÊÇ¿Í»§¶ËµÄչʾ¡£
·þÎñ²ã£ºÖ±½ÓΪ¿Í»§¶ËÌṩµÄ·þÎñ»ò¹¦ÄÜ¡£Ò²ÊÇϵͳËùÄܶÔÍâÌṩµÄ¹¦ÄÜ¡£
ÁìÓò²ã£ºÏµÍ³ÄÚµÄÁìÓò»î¶¯¡£
DAO²ã£ºÊý¾Ý·ÃÎʶÔÏó£¬Í¨¹ýÁìÓòʵÌå¶ÔÏóÀ´²Ù×÷Êý¾Ý¿â¡£
ÆäÖÐÓÐЩָµ¼ÔÔò£º
& ......
ÉùÃ÷£º
ÒÔϵÄÀý×Ó²»Ò»¶¨ÕýÈ·£¬Ö»ÊÇΪÁËÑÝʾ´ó¸ÅµÄÁ÷³Ì¡£
Ò»£ºÎÞ·µ»ØÖµµÄ´æ´¢¹ý³Ì
´æ´¢¹ý³ÌΪ£º
CREATE OR REPLACE PROCEDURE TESTA(PARA1 IN VARCHAR2,PARA2 IN VARCHAR2) AS
BEGIN
INSERT INTO HYQ.B_ID (I_ID,I_NAME) VALUES (PARA1, PARA2);
END TESTA;
È»ºóÄØ£¬ÔÚjavaÀïµ÷ÓÃʱ¾ÍÓÃÏÂÃæµÄ´ ......
ÓÐÁ½ÖÖ·½·¨£º
·½·¨Ò»£ºÓÃjava.util.DateÀàÀ´ÊµÏÖ£¬²¢½áºÏjava.text.DateFormatÀàÀ´ÊµÏÖʱ¼äµÄ¸ñʽ»¯£¬¿´ÏÂÃæ´úÂ룺
import java.util.*;
import java.text.*;
//ÒÔÏÂĬÈÏʱ¼äÈÕÆÚÏÔʾ·½Ê½¶¼ÊǺºÓïÓïÑÔ·½Ê½
//Ò»°ãÓïÑÔ¾ÍĬÈϺºÓï¾Í¿ÉÒÔÁË£¬Ê±¼äÈÕÆڵĸñʽĬÈÏΪMEDIUM·ç¸ñ£¬±ÈÈ磺2008-6-16 20:54:53
//ÒÔÏÂÏÔʾµÄÈ ......
java´ò°ü-exeÎļþ-×îÖÕÒÔsetupÐÎʽ·¢²¼µÄ½â¾öÖ®µÀ
java´ò°ü-exeÎļþ-×îÖÕÒÔsetupÐÎʽ·¢²¼µÄ½â¾öÖ®µÀ
Ê×ÏÈ£¬½«±àÒëºÃµÄ³ÌÐò´ò°ü³ÉjarÎļþ£¬È»ºó×ö³öexe£¬ÕâÑù´úÂë¾Í²»¿É¼ûÁË£»µ«ÊÇexeÎļþÔÚûÓа²×°jreµÄµçÄÔÉϲ»ÄÜÔËÐУ¬Èç¹ûÒªÇó¿Í»§ÔÙÈ¥°²×°jre ÉèÖû·¾³±äÁ¿ ¾Í²»ÑÅÁË¡£ÎÒÃÇÐèÒª½«jre´ò°ü¡£
Õ⼸²½²Ù×÷Í ......