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

java mainfestʹÓÃ

¼ò»¯JavaÓ¦ÓóÌÐòµÄ´ò°üºÍ·¢²¼
·¢²¼JavaÓ¦ÓóÌÐòʱÄã»á¸Ðµ½À§ÄÑ£¿ºÃÔÚJavaÌṩÁËһϵÁдò°üºÍ·¢²¼¹¤¾ß£¬¿ÉÒÔÏÔÖøµÄ¼ò»¯·¢²¼¹ý³Ì
¸ÃÎÄÕÂÌṩÁË´ò°üJava codeµÄ¼¸ÖÖ·½·¨£¬ÎÒÃǽ«»á̽ÌÖJava manifest Îļþ£¬¸ø³öÓÃÓÚ¹ÜÀíJARÎļþËùÒÀÀµÎļþ¡¢¹À¼Æ¿çƽ̨·¢²¼ËùÐèµÄCLasspathµÄºÏÊÊ·½·¨.ÎÒÒ²»á½âÊÍÈçºÎʹÓÃmanifest°ü°æ±¾ÌØÐÔÀ´È·ÈÏ°üµÄ¼æÈÝÐÔ...
ʲôÊÇJARÎļþ£¿
ÔÚ¿ª·¢¹ý³ÌÖУ¬ÎÒÃÇ¿ÉÒÔÖ±½ÓʹÓÃJava classÎļþÀ´ÔËÐгÌÐò£¬µ«Õâ²¢²»ÊÇÒ»¸öºÃ·½Ê½£¬ºÃÔÚJava ÌṩÁË JAR(Java Archive)ÎļþÀ´Ìṩ·¢²¼ºÍÔËÐС£
jar Îļþʵ¼ÊÉÏÊÇclass ÎļþµÄZIPѹËõ´æµµ£¬ÕâÖÖ¸ñʽ±»¹ã·ºÊ¹Óã¬Òò´ËÒ×ÓëʹÓã¬ÓкܶàÖй¤¾ß¿ÉÒÔ²Ù×÷ÕâÖÖ¸ñʽµÄÎļþ¡£Ò²ÕýÊÇÒòΪÕâ¸öÔ­Òò£¬jarÎļþ±¾Éí²¢²»Äܱí´ïËù°üº¬Ó¦ÓóÌÐòµÄ±êÇ©ÐÅÏ¢¡£
Manifest Òò´ËµÃÒÔ³öÏÖ
ΪÁËÒªÌṩ´æµµµÄ±êÇ©ÐÅÏ¢£¬jar ÎļþÖ¸¶¨ÁËÒ»¸öÌض¨Ä¿Â¼À´´æ·Å±êÇ©ÐÅÏ¢£ºMETA-INF Ŀ¼£¬ÆäÖÐÎÒÃÇÀ´¹Ø×¢¸ÃĿ¼ÖеÄMANIFEST.MFÎļþ£¬Ëû¾ÍÊÇJARµÄmanifestÎļþ£¬Ëû°üº¬ÁËJARÎļþµÄÄÚÈÝÃèÊö£¬²¢ÔÚÔËÐÐʱÏòJVMÌṩӦÓóÌÐòµÄÐÅÏ¢£¬´ó¶àÊýJARÎļþº¬ÓÐÒ»¸öĬÈÏÉú³ÉµÄmanifest Îļþ,Ö´ÐÐJARÃüÁî»òʹÓÃzip¹¤¾ß£¬¶¼¿ÉÒÔ²úÉúËü
Èç¹ûÊÇÓÉjarÃüÁî²úÉúµÄ manifest Îļþ£¬ÐÎÈç:
Manifest-Version: 1.0
Created-By:1.4.0-beta
(Sun Microsystems Inc.)
ÕâЩÐÅϢûÉõôÓÃ,½ö½ö¸æËßÎÒÃÇʹÓõÄÊÇ1.0µÄmanifestÎļþ,µÚÒ»Ðж¨ÒåmanifestµÄ¸ñʽ£¬µÚ¶þÐÐ˵Ã÷ʹÓà SUN µÄJDK1.4µÄjar¹¤¾ßÉú³É¸ÃÎļþ£¬Èç¹ûmanifestÎļþÊÇÓÉÆäËû £¨Èçant£© ´´½¨µÄ£¬Äǽ«»á³öÏÖ “Created-By: Ant 1.2” Ö®ÀàµÄÄÚÈÝ£¬Èç¹ûÄãÊÇ×Ô¼º´´½¨manifestÎļþ£¬Äã¿ÉÒÔ¼ÓÈë×Ô¼ºµÄһЩÏà¹ØÐÅÏ¢.
»ù´¡¸ñʽ
manifest ÎļþµÄ¸ñʽ ÊǺܼòµ¥µÄ£¬Ã¿Ò»Ðж¼ÊÇ Ãû£­Öµ ¶ÔÓ¦µÄ:ÊôÐÔÃû¿ªÍ·£¬½Ó×ÅÊÇ ":" £¬È»ºóÊÇÊôÐÔÖµ£¬Ã¿ÐÐ×î¶à72¸ö×Ö·û£¬Èç¹ûÐèÒªÔö¼Ó£¬Äã¿ÉÒÔÔÚÏÂÒ»ÐÐÐøÐУ¬ÐøÐÐÒÔ¿Õ¸ñ¿ªÍ·£¬ÒÔ¿Õ¸ñ¿ªÍ·µÄÐж¼»á±»ÊÓΪǰһÐеÄÐøÐС£
ËùÓÐÔÚ¿ªÍ·µÄÊôÐÔ¶¼ÊÇÈ«¾ÖµÄ£¬ÄãÒ²¿ÉÒÔ¶¨ÒåÌض¨class »òpackageµÄÊôÐÔ£¬ÉԺ󽫽éÉÜÕâÖÖ
°ÑmanifestÎļþ²åÈëJARÎļþ
ʹÓà m Ñ¡Ï°ÑÖ¸¶¨ÎļþÃûµÄmanifestÎļþ ´«È룬ÀýÈç
jar cvfm myapplication.jar myapplication.mf -C classdir
Èç¹ûÄãʹÓÃantÀ´´´½¨Ê±£¬ÔÚant µÄbuild.xml ¼ÓÈëÈçÏÂÌõÄ¿
<target name="jar">
<jar jarfile ="myapplication.jar"
manifest="myapplication.mf">
<fileset dir="


Ïà¹ØÎĵµ£º

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

Îå¡¢javaµÄÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(ÀàºÍ¶ÔÏó)

Îå¡¢javaµÄÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(ÀàºÍ¶ÔÏó)
/**
 * ÃæÏò¶ÔÏóÖ®Ò»
 * ÀàÓë¶ÔÏó
 */
/**
 * ¶ÔÏóµÄʵÀý»¯¹ý³Ì:
 * 1,javaÖÐËùÓÐÀàÐÍÔÚÄÚ´æµÄ·ÖÅäÇé¿ö
 * a,»ù±¾ÀàÐÍ"±äÁ¿"char,byte,short,int,long,float,double,boolean´æ´¢ÔÚ¶ÑÕ»ÖÐ
 *   ¶ÑÕ»ÊÇͨ¹ý¶ÑÕ»Ö¸Õë°´ÕÕÏȽøÏȳöµÄ¶ÁÈ ......

java×Ü½á µÚÆßÕÂ

µÚÆßÕÂ
¸ß¼¶ÀàÌØÕ÷
static
ÀàÊôÐÔÓɸÃÀàµÄËùÓÐʵÀý¹²Ïí
public static int total=0;
µ±totalËùÊôÀà±»Êý´ÎʵÀý»¯µÄʱºò totalÖ»ÓÐÒ»¸ö¶ø²»ÊǶà¸ö
Ò²¿É¾²Ì¬³õʼ»¯static
public static int total£»
static{
total=100;
}
static±ê¼ÇµÄ±äÁ¿»òÕß·½·¨ÓÉÕû¸öÀà(ËùÓÐʵÀý)¹²Ïí
µ¥×Óģʽ
class Single{
   ......

java×Ü½á µÚ¾ÅÕÂ

µÚ¾ÅÕÂ
»ùÓÚÎı¾µÄjavaÓ¦ÓóÌÐò
inputsreamreader is=new inputstreamreader(system.in)
bufferedreader br=new bufferedreader(is)
s=br.readline();
while(!s.euqal("")){}
FLIE f=new file()
filereader ÒÔ×Ö·ûΪµ¥Î»
bufferedreaderÀàµÄreadline
ÒÔÐÐΪµ¥Î»¶ÁÈëÒ»ÐÐ×Ö·û
filewriterÒÔ×Ö·ûΪµ¥Î»ÏòÎļþд³öÊý¾ ......

»ùÓÚJava 2ƽ̨µÄÒýÓÃÀàʹÓÃÖ¸ÄÏ

Java 2 ƽ̨ÒýÈëÁË java.lang.ref °ü£¬ÆäÖаüÀ¨µÄÀà¿ÉÒÔÈÃÄúÒýÓöÔÏ󣬶ø²»½«ËüÃÇÁôÔÚÄÚ´æÖС£ÕâЩÀ໹ÌṩÁËÓëÀ¬»øÊÕ¼¯Æ÷£¨garbage collector£©Ö®¼äÓÐÏ޵Ľ»»¥¡£Peter Haggar ÔÚ±¾ÎÄÖзÖÎöÁË SoftReference ¡¢ WeakReference ºÍ PhantomReference ÀàµÄ¹¦ÄܺÍÐÐΪ£¬²¢¾ÍÕâЩÀàµÄʹÓøø³öÁËһЩ±à³Ì·ç¸ñÉϵĽ¨Òé¡£
µ±ÔÚ Ja ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ