launch4j Óë inno setup ´ò°üjava×ÀÃæÓ¦ÓóÌÐò
×î½üÔÚ×öÒ»¸ö¶Ôjava×ÀÃæÓ¦ÓóÌÐòÏîÄ¿£¬ÐèÒª´ò°ü³ÉͬÆÕͨµÄ¶þ½øÖÆÓ¦ÓóÌÐòÒ»Ñù¡£
[1]ʹÓÃeclipse ½«Õû¸öÏîÄ¿´ò°ü³É¿ÉÔËÐеÄjarÎļþ£¬ÔÚÓ¦Óùý³ÌÖз¢ÏÖ×ÊÔ´ÎļþÈç¹û²»ÊÇͨ¹ýinputstreamÀ´¶ÁÈ¡µÄ»°£¬ÊÇÎÞ·¨·ÃÎʵ½µÄ£¬ÔÚ×öÏîĿʱûÓп¼Âǵ½Õâµã£¬ËùÒÔ×îºóÖ»ºÃ°Ñ×ÊÔ´¿½³öÀ´£¬Ö»¶ÔÀàÎļþ½øÐдò°ü¡£
Ŀ¼½á¹¹£º
|-soft
|- soft.jar
|-native dll
|-jre
|-resources
|-images
ÔÀ´µÄÏîÄ¿½á¹¹ÊÇ
|-src
|-main
|-swingExe.java //mainÖ÷Îļþ
|-panel
|-player
|-resources
|-images
Ïà¹ØÎĵµ£º
public class Test{
public static void main(String args[]){
System.out.println("This is a test program.");
}
}
½«ÉÏÃæµÄÕâ¶Î³ÌÐò±£´æΪÎļþÃûΪTest.javaµÄÎļþ¡£
È»ºó´ò¿ªÃüÁîÌáʾ·û´°¿Ú£¬cdµ½ÄãµÄTest.javaËùÔÚĿ¼£¬È»ºó¼üÈëÏÂÃæµÄÃüÁî
javac Test.java
³ö´í:
Àà Test Êǹ«¹²µÄ£¬Ó¦ ......
ÍøÉÏJAVAµ÷ÓÃDLLµÄÎÄÕ²»ÉÙÁË£¬µ«·¢ÏÖÓÐЩ»¹ÊÇÓÐÎÊÌâ¡£¸ÕºÃÑо¿ÁËһϣ¬ÉÔ×ö¸ü¸Äºó£¬ÔÚVC2005ÉϲâÊÔͨ¹ý£¬£¨ReleaseºÍDebug°æ±¾¾ù¿É£©¡£
¸ü¸Äµã£º
1¡¢#include "jni.h"
2¡¢½«jni_md.hÖеģº#define JNICALL __stdcall±äΪ£º#define JNICALL __cdecl (º¯ÊýʹÓõÄÓ¦¸ÃÊÇcÓïÑÔµÄȱʡµ÷Ó÷½Ê½_cdecl·½Ê½£¬·ñÔòDLLÀ ......
ÈçºÎÓÃJava»ñµÃÒ»¸öÓòÃûµÄIPµØÖ·ÄØ£¿ÌṩÕâ¸ö¹¦ÄܵÄÀà½Ð×öjava.net.InetAddress¡£ÎÒÃǼÙÉèÏÖÔÚÓÐÕâÑùÒ»¸öÓòÃû£¬ËüÓÃÒ»¸ö¾²Ì¬µÄ
getByNameÀ´ÖØлñµÃÒ»¸öInetAddress£¬È»ºóµÃµ½¿ÉÒÔ¶Á³öµÄIPµØÖ·¡£ÏÂÃæµÄ´úÂëÊǷdz£»ù±¾µÄÃüÁîÐС£
import java.net.InetAddress;
import java.net.Unknow ......
±¾ÆªÄÚÈݳнÓÉÏƪ֮ºó£¬ÊôJAVA»ù´¡ÖªÊ¶Ö®Êý¾ÝÀàÐÍ£¬ËùÒÔ¸üÇãÏòÓÚJAVAÓïÑÔ±¾Éí£¬ÊʺϳõѧºÍ¸´Ï°µÄÅóÓÑÔĶÁ¡£
Ò»¡£Êý¾ÝÀàÐÍ
1.»ù±¾Êý¾ÝÀàÐÍ
&nb ......