Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JAVA¿ª·¢»·¾³ÅäÖÃ˵Ã÷Êé

AVA¿ª·¢»·¾³ÅäÖÃ˵Ã÷Êé
µÚÒ»²½£º°²×°JDK£¬µ÷ÊÔÔËÐÐJAVA³ÌÐò±ØÐë¡£
µÚ¶þ²½£º°²×°¿ª·¢¹¤¾ß£¨ºÜ¶à¿ÉÑ¡£©¡£
µÚ
Èý²½£º°²×°J2EE·þÎñÆ÷Èí¼þ£¨JSP/JDBC/SevletµÈ¼¼Êõ±ØÐ룩¡£
µÚËIJ½£º°²×°J2EE¿ª·¢¹¤¾ß£¨JSP/JDBC/SevletµÈ
¼¼Êõ±ØÐ룩¡£
ÒÔÏÂÊÇÏêϸ¹ý³Ì£º
µÚÒ»²½£º°²×°JDK£¬µ÷ÊÔÔËÐÐJAVA³ÌÐò±ØÐë¡£
JDK1.4ĬÈÏ°²×°ÔÚC:\j2sdk1.4.2£¬½¨Òé°²×°Ä¿
¼¸ü¸ÄΪD:\J2SDK
Win2000ÏÂÔò¿ØÖÆÃæ°å->ϵͳ->¸ß¼¶->»·¾³±äÁ¿->ϵͳ±äÁ¿..ѡн¨£¬±äÁ¿ÃûÌîÉÏ
JAVA_HOME£¬
±äÁ¿ÖµÌîÉÏD:\J2SDK(Ó밲װĿ¼һÖ£©,È·¶¨¡£
ÖÁ´ËÒÑ¿É.(ÍƼö°²×°Ê¹Óõڶþ²½µÄJCreator
Pro¼¯³É»·¾³£¬ÈôÓÃÒÔϵÄDOS·½Ê½£¬»¹Ðè×öÁ½´¦ÅäÖã©
ÓÃÃüÁîÐз½Ê½µ÷ÊÔJAVA³ÌÐò£º
 ÉÐÐèÅäÖû·¾³£º
¡¡¡¡¡¡1£©ÉèÖúû·¾³±äÁ¿path
Win98ÏÂÔÚ
autoexce.batÖмÓÈëpath=%path%;d:\j2sdk\bin£¬
ºÃÏñ»¹ÒªÖØÆôϵͳ²ÅÆð×÷ÓÃ
Win2000ÏÂÔò¿ØÖÆÃæ
°å->ϵͳ->¸ß¼¶->»·¾³±äÁ¿->ϵͳ±ä
Á¿...¿´µ½ÁË£¿Ë«»÷Path£¬ÔÚºóÃæ¼ÓÉÏd:\j2sdk\bin¡£
µ±
È»ÎÒÃǼÙÉèJDK°²×°ÔÚÁËd:\j2sdkĿ¼ÏÂ.
ÎÞÐèÖØÆô
 2£©ÕÕÉÏÊöÉèÖÃpathÄÇÑù¡£Ð½¨±äÁ¿Ãûclasspath£¬ÖµÉèΪ£º
.;d:\j2sdk\lib\dt.jar;d:\j2sdk\lib\tools.jar;d:\j2sdk\bin
¡¡¡¡ (1)ÓÃÎı¾±à¼­Æ÷дһ¸ö¼òµ¥µÄjava³ÌÐò£º
public class HelloWorld {
public
static void main(String args[]) {
System.out.println("Hello World!");

}
}
Õâ¸öÀý×Ó¾ÍÊÇÖøÃûµÄ“Hello World”£¬ËüµÄ¹¦ÄܾÍÊÇÏÔʾ“Hello World”¡£
×¢Ò⣺¸ÃÎļþÃû³Æ
±ØÐëΪ“HelloWorld.java”£¬´óСдҲÇø·Ö¡£Ï¸ÐĵÄÅóÓÑ»á×¢Òâµ½¾ÍÊǺÍpublic classºóµÄÃû×ÖÒ»ÑùµÄ¡£
    
(2)±àÒ룺ÔÚdosÃüÁîÌáʾ·ûÏÂÖ´ÐУº£¨×¢Òâ´óСд£©
(×¢Ò⣺DOS²»ÊìϤµÄͬѧ£¬ÇëÔÚDOSÏÂÏȽøÈë±£´æ.javaÔ´ÎļþµÄĿ¼ÔÙÖ´ÐÐÒÔÏÂ
ÃüÁ
javac HelloWorld.java
Èç¹ûÕý³£µÄ»°£¬½«Éú³ÉHelloWorld.classÎļþ¡£
¡¡¡¡
(3)ÔËÐУºÔÚdosÃüÁîÌáʾ·ûÏ£¨WIN2000ÊÇ£º¿ªÊ¼£¬ÔËÐУ¬ÊäÈëcmd£¬È·¶¨)Ö´ÐÐ:
java HelloWorld    
£¨×¢Òâ´óСд£© ºÃÁË£¬Ó¦¸Ã»á³öÏÖΰ´óµÄ“Hello World”ÁË¡£
ÕâÀïÓÐÒ»¸öjava³õѧÕߺÜÓпÉÄÜÓöµ½µÄÎÊÌâ,¾ÍÊÇÊäÈ룺
java HelloWorld.class
¶àÁ˺óÃæµÄ.class£¬Ò»
¶¨Òª×¢Ò⣬·ñÔò»á³öÏÖÏÂÃæµÄ´íÎó£º
Exception in thread "main"
java.lang.NoC


Ïà¹ØÎĵµ£º

JAVAÖеĶàÏß³Ì

1¡¢ ÈÏʶThreadºÍRunnable
JavaÖÐʵÏÖ¶àÏß³ÌÓÐÁ½ÖÖ;¾¶£º¼Ì³ÐThreadÀà»òÕßʵÏÖRunnable½Ó¿Ú¡£RunnableÊǽӿڣ¬½¨ÒéÓýӿڵķ½Ê½Éú³ÉỊ̈߳¬ÒòΪ½Ó¿Ú¿ÉÒÔʵÏÖ¶à¼Ì³Ð£¬¿öÇÒRunnableÖ»ÓÐÒ»¸örun·½·¨£¬ºÜÊʺϼ̳С£ÔÚʹÓÃThreadµÄʱºòÖ»Ðè¼Ì³ÐThread£¬²¢ÇÒnewÒ»¸öʵÀý³öÀ´£¬µ÷ÓÃstart()·½·¨¼´¿ÉÒÔÆô¶¯Ò»¸öÏ̡߳£
Thread Test = ......

JAVAÏß³ÌÖеÄÊØ»¤Ị̈߳¨Daemon£©

ÊØ»¤Ị̈߳¨Daemon£©
JavaÓÐÁ½ÖÖThread£º“ÊØ»¤Ïß³ÌDaemon”Óë“Óû§Ïß³ÌUser”¡£
ÎÒÃÇ֮ǰ¿´µ½µÄÀý×Ó¶¼ÊÇÓû§£¬ÊØ»¤Ïß³ÌÊÇÒ»ÖÖ“ÔÚºǫ́ÌṩͨÓÃÐÔÖ§³Ö”µÄỊ̈߳¬Ëü²¢²»ÊôÓÚ³ÌÐò±¾Ìå¡£
´Ó×ÖÃæÉÏÎÒÃǺÜÈÝÒ×½«ÊØ»¤Ïß³ÌÀí½â³ÉÊÇÓÉÐéÄâ»ú£¨virtual machine£©ÔÚÄÚ²¿´´½¨µÄ£¬¶øÓû§Ïß³ÌÔòÊÇ×Ô ......

ͨ¹ýJava hread dump·ÖÎöÕÒµ½ºÄ·ÑCPU×î¸ßµÄÔ´´úÂë

ͨ¹ýJava hread dump·ÖÎöÕÒµ½ºÄ·ÑCPU×î¸ßµÄÔ´´úÂë
×÷Õߣººú¼Ò»Ô 2010-04-11
×î½ü²úÆ·ÔÚÔËÐйý³ÌÖгöÏÖÁËÐÔÄÜÎÊÌ⣬Ôںܵ͵ÄÁ÷Á¿µÄÇé¿öÏÂCPU¾Í´ïµ½40%£¬Á÷Á¿ÉÔ¸ßʱCPU¾Í´ïµ½98%¡£
²úÆ·ÊÇJavaдµÄ£¬ÔËÐÐÓÚJBOSSƽ̨¡£²Ù×÷ϵͳΪredhat linux¡£µ±Äãͨ¹ýtopÃüÁî·¢ÏÖÄãµÄÓ¦ÓóÌÐòµÄ½ø³ÌÕ¼ÓÃCPU´ï98%ʱ£¬ÎÒÏëÄã¿Ï¶¨ÏëÖªµÀ¾¿¾¹Ê ......

JavaÖÐNative¹Ø¼ü×Ö

Java²»ÊÇÍêÃÀµÄ£¬JavaµÄ²»×ã³ýÁËÌåÏÖÔÚÔËÐÐËÙ¶ÈÉÏÒª±È´«Í³µÄC++ÂýÐí¶àÖ®Í⣬JavaÎÞ·¨Ö±½Ó·ÃÎʵ½²Ù×÷ϵͳµ×²ã£¨ÈçϵͳӲ¼þµÈ)£¬Îª´ËJavaʹÓÃnative·½·¨À´À©Õ¹Java³ÌÐòµÄ¹¦ÄÜ¡£
¿ÉÒÔ½«native·½·¨±È×÷Java³ÌÐòͬ£Ã³ÌÐòµÄ½Ó¿Ú£¬ÆäʵÏÖ²½Ö裺
£±¡¢ÔÚJavaÖÐÉùÃ÷native()·½·¨£¬È»ºó±àÒ룻
£²¡¢ÓÃjavah²úÉúÒ»¸ö.hÎļþ£»
£³¡¢Ð´Ò ......

final ÔÚjavaÖеÄ×¢Òâµã

×¢ÒâÊÂÏîÂýÂý»ýÀÛ
final À಻¿É±»¼Ì³Ð£¬Ò²²»ÄÜÓÐ×ÓÀà¡£
final class Book{}
//class ComBook extends Book{}     Õ⽫±àÒëʧ°Ü£¬ÒòΪBookÀ಻¿É±»¼Ì³Ð¡£
final·½·¨²»¿É±»¸Äд
class Book{
          final void show£¨£©{System.out.println("Book ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ