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

JavaÐéÄâ»ú¼¸¸öÃüÁîÐвÎÊý˵Ã÷

Ò»¡¢ÔËÐÐclassÎļþ
Ö´Ðдømain·½·¨µÄclassÎļþ£¬ÃüÁîÐÐΪ£º
java <CLASSÎļþÃû>
×¢Ò⣺CLASSÎļþÃû²»Òª´øÎļþºó׺.class
ÀýÈ磺
java Test
Èç¹ûÖ´ÐеÄclassÎļþÊÇ´ø°üµÄ£¬¼´ÔÚÀàÎļþÖÐʹÓÃÁË£º
package <°üÃû>
ÄÇÓ¦¸ÃÔÚ°üµÄ»ù·¾¶ÏÂÖ´ÐУ¬ÃüÁîÐÐΪ£º
java <°üÃû>.CLASSÎļþÃû
ÀýÈ磺
PackageTest.javaÖУ¬Æä°üÃûΪ£ºcom.ee2ee.test£¬¶ÔÓ¦µÄÓï¾äΪ£º
package com.ee2ee.test;
PackageTest.java¼°±àÒëºóµÄclassÎļþPackageTest.classµÄ´æ·ÅĿ¼ÈçÏ£º
classes
  |__com
      |__ee2ee
           |__test
                |__PackageTest.java
                |__PackageTest.class
ÒªÔËÐÐPackageTest.class£¬Ó¦ÔÚclassesĿ¼ÏÂÖ´ÐУº
java com.ee2ee.test.PackageTest 
¶þ¡¢ÔËÐÐjarÎļþÖеÄclass
Ô­ÀíºÍÔËÐÐclassÎļþÒ»Ñù£¬Ö»Ðè¼ÓÉϲÎÊý-cp <jarÎļþÃû>¼´¿É¡£
ÀýÈ磺ִÐÐtest.jarÖеÄÀàcom.ee2ee.test.PackageTest£¬ÃüÁîÐÐÈçÏ£º
java -cp test.jar com.ee2ee.test.PackageTest 
Èý¡¢ÏÔʾjdk°æ±¾ÐÅÏ¢
µ±Ò»Ì¨»úÆ÷ÉÏÓжà¸öjdk°æ±¾Ê±£¬ÐèÒªÖªµÀµ±Ç°Ê¹ÓõÄÊÇÄǸö°æ±¾µÄjdk£¬Ê¹ÓòÎÊý-version¼´¿ÉÖªµÀÆä°æ±¾£¬ÃüÁîÐÐΪ£º
java -version 
ËÄ¡¢Ôö¼ÓÐéÄâ»ú¿ÉÒÔʹÓõÄ×î´óÄÚ´æ
javaÐéÄâ»ú¿ÉʹÓõÄ×î´óÄÚ´æÊÇÓÐÏÞÖƵģ¬È±Ê¡ÖµÍ¨³£Îª64MB»ò128MB¡£
Èç¹ûÒ»¸öÓ¦ÓóÌÐòΪÁËÌá¸ßÐÔÄܶø°ÑÊý¾Ý¼ÓÔØÄÚ´æÖжøÕ¼ÓýϴóµÄÄڴ棬±ÈÈ糬¹ýÁËĬÈϵÄ×î´óÖµ128MB£¬ÐèÒª¼Ó´ójavaÐéÄâ»ú¿ÉʹÓõÄ×î´óÄڴ棬·ñÔò»á³öÏÖOut of Memory£¨ÏµÍ³ÄÚ´æ²»×㣩µÄÒì³£¡£Æô¶¯javaʱ£¬ÐèҪʹÓÃÈçÏÂÁ½¸ö²ÎÊý£º
-Xms javaÐéÄâ»ú³õʼ»¯Ê±Ê¹ÓõÄÄÚ´æ´óС
-Xmx javaÐéÄâ»ú¿ÉÒÔʹÓõÄ×î´óÄÚ´æ
ÒÔÉÏÁ½¸ö²ÎÊýÖÐÉèÖõÄsize£¬¿ÉÒÔ´øµ¥Î»£¬ÀýÈ磺256m±íʾ256MB
¾ÙÀý˵Ã÷£º
java -Xms128m -Xmx256m ...
±íʾjavaÐéÄâ»ú³õʼ»¯Ê±Ê¹ÓõÄÄÚ´æΪ128MB£¬¿ÉʹÓõÄ×î´óÄÚ´æΪ256MB¡£
¶ÔÓÚtomcat£¬¿ÉÒÔÐÞ¸ÄÆä½Å±¾catalina.sh£¨unixƽ̨£©»òcatalina.bat£¨windowsƽÌ


Ïà¹ØÎĵµ£º

¡¶javaÓïÑÔ³ÌÐòÉè¼Æ£¨Ò»£©¡·2009Äê×Ôѧ¿¼ÊÔ´ó¸ÙµÚ8ÕÂ


µÚ8Õ ¶àÏß³Ì
(Ò»)¿Î³ÌÄÚÈÝ
8.1Ï̵߳Ļù±¾¸ÅÄî
8.1.1Ï̵߳ÄÉúÃüÖÜÆÚ
8.1.2Ï̵߳÷¶ÈÓëÓÅÏȼ¶
8.2 ThreadÀàºÍRunnable½Ó13
8.2.1 ThreadÀà
8.2.2 Runnable½Ó¿Ú
8.3Ï̻߳¥³âºÍͬ²½
8.3.1Ï̻߳¥³â
8.3.2Ïß³Ìͬ²½
(¶þ)ѧϰĿµÄÓëÒªÇó
±¾Õ½éÉܶàÏ̵߳ĸÅÄîºÍ±àд¶àÏ̳߳ÌÐòµÄ·½·¨£¬ÊµÏÖÏß³ÌÖ®¼äÏ໥ͨÐźÍͬ²½µÄ¼¼ ......

javaÊý¾ÝÀàÐÍÖ®¼äµÄת»»

 1£®JavaµÄ¼òµ¥ÀàÐͼ°Æä·â×°Æ÷Àà
¢ÅJava¼òµ¥ÀàÐÍÓë·â×°Àà
ÎÒÃÇÖªµÀ,JavaÓïÑÔÊǵäÐ͵ÄÖ§³ÖÃæÏò¶ÔÏóµÄ³ÌÐòÓïÑÔ,µ«¿¼Âǵ½ÓÐЩ»ù±¾Êý¾ÝÀàÐ͵Ľṹ¼òµ¥,Õ¼ÄÚ´æСÇÒ´æÈ¡ËٶȿìµÈÓŵã,JavaÒÀÈ»ÌṩÁ˶ÔÕâЩ·ÇÃæÏò¶ÔÏóµÄ¼òµ¥Êý¾ÝÀàÐ͵ÄÖ§³Ö¡£µ±È»,JavaÔÚÌṩ´óÁ¿µÄÆäËüÀàʱ,Ò²ÌṩÁËÓë¼òµ¥Êý¾ÝÀàÐͶÔÓ¦µÄ·â×°Àà,ÓÚÊÇ,JavaÖ ......

java µ÷ÓÃÃüÁî ±¸·ÝmysqlÊý¾Ý¿â

 ´úÂëÈçÏ£º
  1  String command  =   " cmd /c C:/Program Files/MySQL/MySQL Server 5.0/bin>mysqldump -h localhost -u root -p aijia > E:/aijia.dmp " ;
  2      try    {
  3     Process process& ......

javaʱ¼ä¶¯Ì¬ÏÔʾ Á½ÖÖ·½·¨

ʱ¼ä¶¯Ì¬ÏÔʾ
1.·½·¨Ò» ÓÃTimerTask
ÀûÓÃjava.util.TimerºÍjava.util.TimerTaskÀ´×ö¶¯Ì¬¸üУ¬±Ï¾¹Ã¿´Î¸üпÉÒÔ¿´×÷ÊǼÆʱ1Ãë·¢ÉúÒ»´Î¡£
´úÂëÈçÏ£º
import java.awt.Dimension;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Timer;
import java.util ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ