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

ʹÓÃJNI¼¼ÊõʵÏÖJAVA³ÌÐòµ÷ÓÃdll

 JAVAµÄ¿çƽ̨µÄÌØÐÔÉîÊÜjava³ÌÐòÔ±ÃǵÄϲ°®,µ«ÕýÊÇÓÉÓÚËüΪÁËʵÏÖ¿çƽ̨µÄÄ¿µÄ,ʹµÃËüºÍ±¾µØ»úÆ÷µÄ¸÷ÖÖÄÚ²¿ÁªÏµ±äµÃºÜÉÙ,´ó´óÔ¼ÊøÁËËüµÄ¹¦ÄÜ,±ÈÈçÓëһЩӲ¼þÉ豸ͨÐÅ,ÍùÍùÒª»¨·ÑºÜ´óµÄ¾«Á¦È¥Éè¼ÆÁ÷³Ì±àд´úÂëÈ¥¹ÜÀíÉ豸¶Ë¿Ú,¶øÇÒÓÐһЩÉ豸³§ÉÌÌṩµÄÓ²¼þ½Ó¿ÚÒѾ­¾­¹ýÒ»¶¨µÄ·â×°ºÍ´¦Àí,²»ÄÜÖ±½ÓʹÓÃjava³ÌÐòͨ¹ý¶Ë¿ÚºÍÉ豸ͨÐÅ,ÕâÖÖÇé¿öϾ͵ÿ¼ÂÇʹÓÃjava³ÌÐòÈ¥µ÷ÓñȽÏÉó¤Í¬ÏµÍ³´ò½»µÀµÄµÚÈý·½³ÌÐò,´Ó1.1°æ±¾¿ªÊ¼µÄJDKÌṩÁ˽â¾öÕâ¸öÎÊÌâµÄ¼¼Êõ±ê×¼:JNI¼¼Êõ.
       JNIÊÇJava Native Interface(Java±¾µØ½Ó¿Ú)µÄËõд,±¾µØÊÇÏà¶ÔÓÚjava³ÌÐòÀ´ËµµÄ,Ö¸Ö±½ÓÔËÐÐÔÚ²Ù×÷ϵͳ֮ÉÏ,Óë²Ù×÷ϵͳֱ½Ó½»»¥µÄ³ÌÐò.´Ó1.1°æ±¾µÄJDK¿ªÊ¼,JNI¾Í×÷Ϊ±ê׼ƽ̨µÄÒ»²¿·Ö·¢ÐÐ.ÔÚJNI³öÏֵijõÆÚÊÇΪÁËJava³ÌÐòÓë±¾µØÒѱàÒëÓïÑÔ,ÓÈÆäÊÇCºÍC++µÄ»¥²Ù×÷¶øÉè¼ÆµÄ,ºóÀ´¾­¹ýÀ©Õ¹Ò²¿ÉÒÔÓëcºÍc++Ö®ÍâµÄÓïÑÔ±àдµÄ³ÌÐò½»»¥,ÀýÈçDelphi³ÌÐò.
       ʹÓÃJNI¼¼Êõ¹ÌÈ»ÔöÇ¿ÁËjava³ÌÐòµÄÐÔÄܺ͹¦ÄÜ,µ«ÊÇËüÒ²ÆÆ»µÁËjavaµÄ¿çƽ̨µÄÓŵã,Ó°Ïì³ÌÐòµÄ¿ÉÒÆÖ²ÐԺͰ²È«ÐÔ,ÀýÈçÓÉÓÚÆäËûÓïÑÔ(ÈçC/C++)¿ÉÄÜÄܹ»ËæÒâµØ·ÖÅä¶ÔÏó/Õ¼ÓÃÄÚ´æ,JavaµÄÖ¸Õ밲ȫÐԵò»µ½±£Ö¤.µ«ÔÚÓÐЩÇé¿öÏÂ,ʹÓÃJNIÊÇ¿ÉÒÔ½ÓÊܵÄ,ÉõÖÁÊDZØÐëµÄ,ÀýÈçÉÏÃæÌáµ½µÄʹÓÃjava³ÌÐòµ÷ÓÃÓ²¼þ³§ÉÌÌṩµÄÀà¿âͬÉ豸ͨÐŵÈ,Ä¿Ç°Êг¡ÉϵÄÐí¶à¶Á¿¨Æ÷É豸¾ÍÊÇÕâÖÖÇé¿ö.ÔÚÕâ±ØÐëʹÓÃJNIµÄÇé¿öÏÂ,¾¡Á¿°ÑËùÓб¾µØ·½·¨¶¼·â×°ÔÚµ¥¸öÀàÖÐ,Õâ¸öÀàµ÷Óõ¥¸öµÄ±¾µØ¿âÎļþ,²¢±£Ö¤¶ÔÓÚÿÖÖÄ¿±ê²Ù×÷ϵͳ,¶¼¿ÉÒÔÓÃÌض¨ÓÚÊʵ±Æ½Ì¨µÄ°æ±¾Ìæ»»Õâ¸öÎļþ,ÕâÑùʹÓÃJNIµÃµ½µÄÒª±ÈʧȥµÄ¶àºÜ¶à.
       ÏÖÔÚ¿ªÊ¼ÌÖÂÛÉÏÃæÌáµ½µÄÎÊÌâ,Ò»°ãÉ豸ÉÌ»áÌṩÁ½ÖÖÀàÐ͵ÄÀà¿âÎļþ,windowsϵͳµÄ»á°üº¬.dll/.h/.libÎļþ,¶ølinuxϵͳµÄ»á°üº¬.so/.aÎļþ,ÕâÀïÖ»ÌÖÂÛwindowsϵͳϵÄc/c++±àÒëµÄdllÎļþµ÷Ó÷½·¨.
       ÎÒ°ÑÉ豸ÉÌÌṩµÄdllÎļþ³Æ֮ΪµÚÈý·½dllÎļþ,Ö®ËùÒÔ˵µÚÈý·½,ÊÇÒòΪJNIÖ±½Óµ÷ÓõÄÊÇ°´ËüµÄ±ê׼ʹÓÃc/c++ÓïÑÔ±àÒëµÄdllÎļþ,Õâ¸öÎļþÊÇ¿Í»§³ÌÐòÔ±°´ÕÕÉ豸ÉÌÌṩµÄ.hÎļþÖеÄÁгöµÄ·½·¨±àдµÄdllÎļþ,ÎÒ³Æ֮ΪµÚ¶þ·½dllÎļþ,ÕæÕýµ÷ÓÃÉ豸ÉÌÌṩµÄdllÎļþµÄÆäʵ¾ÍÊÇÕâ¸öµÚ¶þ·½dllÎļþ.µ½ÕâÀï,½â¾öÎÊÌâµÄ˼·ÒѾ­²úÉúÁË,´ó¿®·Ö¿ÉÒÔ·ÖΪÈý²½:
       1>±àдһ¸öjavaÀà,Õâ¸öÀà°üº¬µÄ·½·¨ÊÇ°´Õ


Ïà¹ØÎĵµ£º

java exception javaÒì³£»ã×Ü(1)

 java exception ½â¾ö·½°¸ - ÎÒµÄÒì³£Íø|Òì³£|exception 730 - org.hibernate.LazyInitializationException:could not initialize proxy 731 - ¾¯¸æ: Error setting value 732 - override and commit 733 - Building workspace has encountered a problem. Errors during build 734 - Could not open the editor: An ......

Java Proxy¶¯Ì¬´úÀí

ÏÈ¿´¸öÀý×Ó£º
½Ó¿Ú
package example;
 
public interface Basic {
    public void hello();
}
 
½Ó¿ÚµÄʵÏÖÀà
package example;
 
public class BasicService implements Basic {
    public void hello() {
        Sysyt ......

Java¿ª·¢¹¤¾ß¼°³ÌÐòÉè¼Æ³õ²½

 ÊµÑé1  Java¿ª·¢¹¤¾ß¼°³ÌÐòÉè¼Æ³õ²½
ʵÑéÄ¿µÄ
 Äܹ»´î½¨JavaµÄ¿ª·¢»·¾³
 ÊìϤ³£ÓõÄJDK²Ù×÷ÃüÁîµÄʹÓÃ
 ÊìϤJava³ÌÐòµÄ±àдºÍ±àÒë¹ý³Ì
 Á˽ⳣÓÃJava¿ª·¢¹¤¾ßµÄʹÓÃ
ʵÑéÄÚÈÝ
ʵÑéÁ·Ï°1£º´î½¨ºÍʹÓÃJDK
1£®JDKµÄÏÂÔغͰ²×°
JDKÊÇSUN¹«Ë¾Ãâ·ÑÔÚÍøÉÏ·¢²¼µÄ£¬ÎÒÃÇ¿ÉÒÔ½øÈ ......

javaÁ¬½Ó³Ødz̸


1. ÒýÑÔ
¡¡¡¡½üÄêÀ´£¬Ëæ×ÅInternet/Intranet½¨Íø¼¼ÊõµÄ·ÉËÙ·¢Õ¹ºÍÔÚÊÀ½ç·¶Î§ÄÚµÄѸËÙÆÕ¼°£¬¼ÆËã»ú
¡¡¡¡Ó¦ÓóÌÐòÒÑ´Ó´«Í³µÄ×ÀÃæÓ¦ÓÃתµ½WebÓ¦Ó᣻ùÓÚB/S£¨Browser/Server£©¼Ü¹¹µÄ3²ã¿ª·¢Ä£Ê½Öð½¥È¡´úC/S£¨Client/Server£©¼Ü¹¹µÄ¿ª·¢Ä£Ê½£¬³ÉΪ¿ª·¢ÆóÒµ¼¶Ó¦Óú͵ç×ÓÉÌÎñÆÕ±é²ÉÓõļ¼Êõ¡£ÔÚWebÓ¦Óÿª·¢µÄÔçÆÚ£¬Ö÷ҪʹÓõ ......

java ÕÒ³ö4λÊýµÄËùÓÐÎüѪ¹íÊý×Ö

 /**
* ÕÒ³öËÄλÊýËùÓеÄÎüѪ¹íÊý×Ö
* ÎüѪ¹íÊý×Ö£ºÎ»ÊýΪżÊýµÄÊý×Ö¿ÉÒÔÓÉÒ»¶ÔÊý×ÖÏà³Ë¶øµÃ£¬Õâ¶ÔÊý×Ö°üº¬³Ë»ýÒ»°ëµÄλÊý
* È磺1260 = 21*60
*/
public class Vampire {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

String s= ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ