¹ØÓÚ½«java³ÌÐò×ö³ÉexeÎļþµÄ¼¸ÖÖ×ö·¨£¨ZT£©
¿ÉÒÔ°ÑÆÕͨµÄJava³ÌÐò×ö³ÉÕæÕýµÄexe,Ò²¾ÍÊǵ¥Ò»¸öexe¾Í¿ÉÒÔÔÚûÓа²×°JVMµÄ»úÆ÷ÉÏÔËÐС£ÕâÑùµÄ¹¤¾ß³£¼ûµÄÓÐJETºÍgcj.Ç°ÕßÊÇÊշѵģ¬¶øÇÒ×ö³öÀ´µÄexe»¹ÊÇÐèÒªÒ»¶Ñdll¡£ÍƼöʹÓÃgcj.ËûÓÐwindowsºÍLinux°æ£¬Ö±½ÓÏÂÔØzip°ü£¬²»ÐèÒª°²×°£¬ÀïÃæÓв»ÉÙÀý×Ó£¬Ò»Ð©buildµÄÅú´¦ÀíÎļþ¡£´ÓÔÀíÀ´Ëµgcj×Ô¼ºÊµÏÖÁËJVM¹æ·¶£¬Ò²¾ÍÊÇÄã±àдһ¸öHelloWorld.java,ÆäÖеÄmain·½·¨ÎªSystem.out.println("foo");
µ±Ê¹ÓÃgcj°ÑËü×ö³Éexe(´óÔ¼2M)£¬ÔËÐÐÕâ¸öexeʱ£¬»áÆô¶¯ÀïÃæµÄÒ»¸öСÐÍjvm,ÔÚÕâÉÏÃæÅÜHelloWorld¡£
Æäʵ£¬°ÑJava×ö³É´¿exeʵÔÚÊdzÔÁ¦²»Ìֺã¬ÓкܶàÏÞÖÆ£¬ÎļþÓÖ´ó¡£
ÎұȽÏÇãÏòÁí¼¸ÖÖ×ö·¨£º
. ʹÓÃInstallAnywhereµÈ¹¤¾ß£¬ÖÆ×÷Ò»¸öexeµÄ°²×°°ü
Óû§¿ÉÒÔÑ¡ÔñʹÓÃËû»úÆ÷ÉϵÄJRE»òÊÇÕâ¸ö°²×°°üÄÚµÄJREÀ´ÔËÐгÌÐò
ÕâÊǺܳ£¼ûµÄÒ»ÖÖ×ö·¨£¬ÈçJBuilder¾ÍÊÇÕâô×öµÄ¡£
ÕâÑùµÄºÃ´¦ÊDz»ÒªÇó¶Ô·½»úÆ÷ÉÏ×°ÓÐJRE£¬¶øÇÒÄãÔÀ´µÄ³ÌÐò²»ÐèÒªÈκθĶ¯¡£
InstallAnywhereÖÐÒ»¸öѹËõµÄJRE´ó¸ÅÊÇ8M¡£
. ÖÆ×÷³É¿ÉÖ´ÐеÄjar,Ò²¾ÍÊÇÔÚMETA-INFµÄMANIFESTÎļþÖƶ¨Main-Class
¿ÉÒÔͨ¹ýÃüÁîÐÐjava -jar jarfile.jarÀ´Ö´ÐУ¬windowsĬÈϵİÑ*.jarʹÓÃjavaw -jar´ò¿ª£¬ËùÒÔÓÐЩ»úÆ÷ÉÏ¿ÉÒÔÖ±½ÓË«»÷jarÔËÐС£
. ÖÆ×÷αexe,ÆäʵºÍÉÏÒ»ÖÖ×ö·¨ÊÇÒ»ÑùµÄ£¬Ö»²»¹ý×ö³Éexe,µ÷ÓÃϵͳµÄjava.exeÀ´ÔËÐÐËü£¬ÕâÑùµÄ¹¤¾ßÓÐnativeJ,exe4jµÈ
ÆäʵJava²»ÏñVB,DelphiÖ»ÊÇÒ»¸öÓïÑÔ£¬¶øÊÇÒ»¸öƽ̨¡£
jarÊÇ×î³£ÓõIJ¿Êðµ¥Ôª£¬×ö³ÉexeûʲôÒâ˼¡£
Ò»¡¢exe4j¡£
˵Ã÷£ºexe4j¿ÉÒÔ½«JarÎļþÖÆ×÷³ÉexeÎļþ£¬µ«ÐèjreÖ§³Ö£¬Ò²¿É½«JarÎļþ·ÅÔÚÍâÃæ¡£
Èí¼þÐÔÖÊ£º¹²ÏíÈí¼þ
ÏÂÔصØÖ·£ºhttp://www.ej-technologies.com/products/exe4j/overview.html
¶þ¡¢JBuilder¡£
˵Ã÷£ºÐ°汾µÄJBuilder¿ÉÒÔÖ±½Ó°Ñ¹¤³ÌÖÆ×÷³É¸÷ϵͳµÄ¿ÉÖ´ÐÐÎļþ£¬°üÀ¨Windowsϵͳ¡£
Èí¼þÐÔÖÊ£ºÉÌÒµÈí¼þ
ÏÂÔصØÖ·£ºÂÔ¡£ÎÒÊÇ´ÓeMuleÏÂÔصġ£
Èý¡¢NativeJ¡£
˵Ã÷£ºÓëexe4j¹¦ÄÜÀàËÆ¡£
Èí¼þÐÔÖÊ£º¹²ÏíÈí¼þ
ÏÂÔصØÖ·£ºhttp://www.dobysoft.com/products/nativej/download.html
ËÄ¡¢Excelsior JET¡£
˵Ã÷£º¿ÉÒÔÖ±½Ó½«JavaÀàÎļþÖÆ×÷³ÉexeÎļþ£¬³ýAWTºÍSwing¼°µÚÈý·½Í¼ÐνӿÚÍâ¿É²»ÐèjreÖ§³Ö£¨Java5.0²»ÐУ©¡£
&
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
package test;
import java.lang.reflect.Method;
public class InvokeTest {
/**
*
* main ·½·¨
* @param args
* void
*/
public static void main(String[] args) {
try {
&nbs ......
ÏÈ¿´¸öÀý×Ó£º
½Ó¿Ú
package example;
public interface Basic {
public void hello();
}
½Ó¿ÚµÄʵÏÖÀà
package example;
public class BasicService implements Basic {
public void hello() {
Sysyt ......
²»ÖªµÀÊÇ·ñÎÒ¿´µÄÊéÌ«ÉÙ£¬ÎÒ¾õµÃÄ¿Ç°¿´µ½µÄËùÓеÄjavaµÄÈëÃŵÄÊ鶼²»ÊʺϳõѧÕß¡£ÕâÖÖ²»Êʺϣ¬²»ÊÇÄÚÈݲ»Êʺϣ¬ÆäʵÄÚÈݽ²µÃ¶¼ºÃ£¬µ«ÊǾÍÊDz»Äܱ»³õѧÕß¿ìËÙÎüÊÕ¡£ÎªÊ²Ã´²»ÊʺÏÄØ£¬ÒòΪûÓж¨ÒåºÃʲôÊdzõѧÕߣ¬¶øÇÒÕâЩ±àÊéµÄÈË£¬¶¼¾¹ýÕý¹æµÄ½ÌÓý£¬Ã»ÓÐÀí½âʲôÊdzõѧÕߣ¬³õѧÕßµ½µ ......
1. ÒýÑÔ
¡¡¡¡½üÄêÀ´£¬Ëæ×ÅInternet/Intranet½¨Íø¼¼ÊõµÄ·ÉËÙ·¢Õ¹ºÍÔÚÊÀ½ç·¶Î§ÄÚµÄѸËÙÆÕ¼°£¬¼ÆËã»ú
¡¡¡¡Ó¦ÓóÌÐòÒÑ´Ó´«Í³µÄ×ÀÃæÓ¦ÓÃתµ½WebÓ¦Ó᣻ùÓÚB/S£¨Browser/Server£©¼Ü¹¹µÄ3²ã¿ª·¢Ä£Ê½Öð½¥È¡´úC/S£¨Client/Server£©¼Ü¹¹µÄ¿ª·¢Ä£Ê½£¬³ÉΪ¿ª·¢ÆóÒµ¼¶Ó¦Óú͵ç×ÓÉÌÎñÆÕ±é²ÉÓõļ¼Êõ¡£ÔÚWebÓ¦Óÿª·¢µÄÔçÆÚ£¬Ö÷ҪʹÓõ ......