Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Àà,Õâ¸öÀà°üº¬µÄ·½·¨ÊÇ°´ÕÕÉè±


Ïà¹ØÎĵµ£º

IBM FileNet Content Java API ¼ò½é

2008 Äê 6 ÔÂ 24 ÈÕ
Ô­ÎĵØÖ·£º http://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0806wangys/
±¾ÎĽéÉÜ IBM FileNet P8 4.0 Platform ÌṩµÄ Content Java API¡£Ê×ÏÈ¶Ô FileNet P8 Content Engine ºÍ API ½øÐиÅÒª½éÉÜ, ²¢ËµÃ÷ÁËһЩ»ù±¾¸ÅÄËæºóÏêϸ½éÉÜÁË FileNet Content EngineÌṩµÄ»ùÓÚ EJB ......

¡¾Ëæ±Ê¡¿java ÐéÄâ°´¼ü

import java.awt.Robot;
import java.io.IOException;
import java.lang.reflect.Field;
public class TestServer {
Class<?> key;
Robot ro;
{//·Ç¾²Ì¬¿éÓÃÓÚ³õʼ»¯ÀàÀàµÄ·Ç¾²Ì¬³ÉÔ±
try {
key = Class.forName("java.awt.event.KeyEvent");
ro = new Robot();
}
catch (Excep ......

Java Êý×é List ÈçºÎ´«Öµ

// ºÏ²¢ List ÖеÄÏàͬÊý¾ÝÐÐ
// Source £º tmpOrderEntryListBeanList
// Target £º resultOrderEntryListBeanList
// ------------------------------------------------------------------

// £¨1£©½«½á¹û¸³¸ø Result Livon 2010-5-18 Èý
// ÕûÀíÁÐ±í£¬ÒÔ±ã²éѯ¿â´æ¡£
private List<OrderEntryListBe ......

JavaµÄÀ¬»ø»ØÊÕ£¨Garbage Collection£©»úÖÆ

Ò»¡£Ë­ÔÚ×öGarbage Collection£¿
    Ò»ÖÖÁ÷ÐеÄ˵·¨£ºÔÚC++
ÀÊÇϵͳÔÚ×öÀ¬»ø»ØÊÕ£»¶øÔÚJava
ÀÊÇJava
×ÔÉíÔÚ×ö¡£
    ÔÚC++
À
ÊÍ·ÅÄÚ´æÊÇÊÖ¶¯´¦ÀíµÄ£¬ÒªÓÃdeleteÔËËã·ûÀ´ÊÍ·Å·ÖÅäµÄÄÚ´æ¡£ÕâÊÇÁ÷ÐеÄ˵·¨¡£È·ÇеØ˵£¬ÊÇÓ¦ÓÃÈÏΪ²»ÐèҪijʵÌåʱ£¬¾ÍÐèÓÃdelete¸æËßϵͳ£¬¿É
ÒÔ ......

JavaÐòÁл¯¼òÃ÷¸ÅÒª

1. ¸ÅÄ ÐòÁл¯¾ÍÊǰѶÔÏó±ä³É¶ÔÏóÁ÷£¨È·ÇÐ˵ÊǰѶÔÏóµÄÊôÐÔдÈëÁ÷£©£¬Èç¹ûÐèÒª½ø¶ø¿ÉÒ԰ѶÔÏóÁ÷´æ³É¶þ½øÖÆÎļþ£»
2. Ä¿µÄ£º ÐòÁл¯µÄÄ¿µÄÊÇΪÁË·½±ãÓÀ¾Ã´æ´¢»òÕßÍøÂç´«Ê䣻
3. ÈçºÎʵÏÖ£º ½«ÀàʵÏÖSerializable½Ó¿Ú¼´¿É£¬ÎÞ±ØÐëʵÏֵķ½·¨£¬ÊµÏָýӿÚÖ»ÊÇΪÁ˱êʶ¸ÃÀà¿É±»ÐòÁл¯£»
4. £¨×ª£©ÆäËûÐèÒªÖªµÀµÄ£º
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ