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

ÓÃDelphi¿ª·¢JNI(Java+Native+Interface)Ó¦ÓÃ

JNI(Java+Native+Interface£¬Java±¾µØ½Ó¿Ú)¼¼Êõ´ó¼Ò¶¼²»Ä°Éú£¬Ëü¿ÉÒÔ°ïÖú½â¾öJava·ÃÎʵײãÓ²¼þµÄ¾ÖÏÞºÍÖ´ÐÐЧÂʵÄÌá¸ß¡£¹ØÓÚJNIµÄ¿ª·¢£¬´ó¶àÊý×ÊÁÏÌÖÂ۵Ķ¼ÊÇÈçºÎÓÃC/C++ÓïÑÔ¿ª·¢JNI£¬ÉõÖÁÓÚJDKÒ²ÌṩÁËÒ»¸öjavah¹¤¾ßÀ´×Ô¶¯Éú³ÉCÓïÑÔ³ÌÐò¿ò¼Ü¡£µ«ÊÇ£¬¶ÔÓÚ¹ã´óµÄDelphi³ÌÐòÔ±À´Ëµ£¬ÄѵÀ¾Í²»ÄÜÓÃ×Ô¼ºÏ²°®µÄDelphiÓëJava»¥Í¨ÏûÏ¢ÁËÂ𣿭
¡¡¡¡Í¨¹ý¶ÔjavahÉú³ÉµÄC³ÌÐò¿ò¼ÜºÍJDKÖеÄjni.hÎļþµÄ·ÖÎö£¬ÎÒÃÇ·¢ÏÖ£¬JavaÀûÓÃJNI·ÃÎʱ¾µØ´úÂëµÄ¹Ø¼üÔÚÓÚjni.hÖж¨ÒåµÄJNINativeInterface_Õâ¸ö½á¹¹(Struct)£¬Èç¹ûÓÃDelhpiÓïÑÔ¸ÄдËüµÄ¶¨Ò壬Ӧ¸ÃÒ²¿ÉÒÔ¿ª·¢JNIµÄ±¾µØ´úÂë¡£ÐÒÔ˵ÄÊÇ£¬ÔÚÍøÉÏÓÐÏֳɵĴúÂë¿ÉÒÔ°ïÖúÄãÍê³ÉÕâ¸ö·±ÔӵŤ×÷£¬ÔÚhttp://delphi-jedi.orgÉÏÌṩÁËÒ»¸öjni.pasÎļþ£¬¾ÍÊÇÓÃDelphiÓïÑÔÖØдµÄjni.h¡£ÎÒÃÇÖ»ÐèÔÚ×Ô¼ºµÄDelphi¹¤³ÌÖмÓÈëjni.pas¾Í¿ÉÒÔ·½±ãµØ¿ª·¢³ö»ùÓÚDelphiÓïÑÔµÄJNI±¾µØ´úÂë¡£­
¡¡¡¡¡¡¡¡±¾ÎĽ«ÀûÓÃjni.pas£¬ÌÖÂÛÓÃDelphiÓïÑÔ¿ª·¢JNI±¾µØ´úÂëµÄ»ù±¾·½·¨¡£­
­
ÏÈÀ´¿´Ò»¸ö¾­µäµÄHelloWorldÀý×Ó¡£±àдÒÔÏÂJava´úÂ룺­
­
class+HelloWorld­

public+native+void+displayHelloWorld();+­
static­

System.loadLibrary("HelloWorldImpl");+­


­
¡¡¡¡Õâ¶Î´úÂëÉùÃ÷ÁËÒ»¸ö±¾µØ·½·¨displayHelloWorld£¬ËüûÓвÎÊý£¬Ò²Ã»Óзµ»ØÖµ£¬µ«ÊÇÏ£ÍûËüÄÜÔÚÆÁÄ»ÉÏ´òÓ¡³ö“ÄúºÃ£¡Öйú¡£”×ÖÑù¡£Õâ¸öÈÎÎñÎÒÃÇ´òËã½»¸øÁ˱¾µØµÄDelphiÀ´ÊµÏÖ¡£Í¬Ê±£¬ÔÚÕâ¸öÀàµÄ¾²Ì¬ÓòÖУ¬ÓÃSystem.loadLibrary()·½·¨×°ÔØHelloWorldImpl.dll¡£×¢Ò⣬ÕâÀïÖ»ÐèÒª¸ø³öÎļþÃû¶ø²»ÐèÒª¸ø³öÀ©Õ¹Ãûdll¡£­
¡¡¡¡Õâʱºò£¬Èç¹ûÔÚÎÒÃǵÄJava³ÌÐòÖÐʹÓÃHelloWorldÀàµÄdisplayHelloWorld·½·¨£¬ÏµÍ³½«Å׳öÒ»¸öjava.lang.UnsatisfiedLinkErrorµÄ´íÎó£¬ÒòΪÎÒÃÇ»¹Ã»ÓÐΪËüʵÏÖ±¾µØ´úÂë¡£­
¡¡¡¡ÏÂÃæÔÙ¿´Ò»ÏÂÔÚDelphiÖеı¾µØ´úÂëµÄʵÏÖ¡£Ð½¨Ò»¸öDLL¹¤³Ì£¬¹¤³ÌÃûΪHelloWorldImpl£¬ÊäÈëÒÔÏ´úÂ룺­
­
Uses­
JNI;+­
procedure+Java_HelloWorld_displayHelloWorld(PEnv:+PJNIEnv;+Obj:+JObject);+stdcall;+­
begin­
Writeln('ÄúºÃ£¡Öйú¡£');+­
end;+­
exports­
Java_HelloWorld_DisplayHelloWorld;+­
end.­
­
¡¡¡¡Õâ¶Î´úÂëÊ×Ïȵ¼Èëjni.pasµ¥Ôª¡£È»ºóʵÏÖÁËÒ»¸ö½ÐJava_HelloWorld_displayHelloWorldµÄ¹ý³Ì£¬Õâ¸ö¹ý³ÌµÄÃüÃû


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

Javaѧϰ±Ê¼Ç¢Ü javaÐÞÊδÊ×ܽá


 
 
JavaÓïÑÔ¶¨ÒåÁËpublic¡¢protected¡¢private¡¢abstract¡¢staticºÍfinalÕâ6ÖÖ³£ÓÃÐÞÊδÊÍ⻹¶¨ÒåÁË5¸ö²»Ì«³£ÓõÄÐÞÊδʣ¬ÏÂÃæÊǶÔÕâ11¸öJavaÐÞÊδʵĽéÉÜ£º
1.public
ʹÓöÔÏó£ºÀà¡¢½Ó¿Ú¡¢³ÉÔ±
½éÉÜ£ºÎÞÂÛËüËù´¦Ôڵİü¶¨ÒåÔÚÄÄ£¬¸ÃÀࣨ½Ó¿Ú¡¢³ÉÔ±£©¶¼ÊÇ¿É·ÃÎʵÄ
2.private
ʹÓöÔÏ󣺳ÉÔ±
½éÉÜ£º³ÉÔ ......

XSDÀûÓÃEMFÉú³ÉJAVA´úÂëµÄÏà¹Ø²½Öè¼°ÅäÖÃ

²½ÖèÒ»£ºµ¼ÈëEMFµÄ²å¼þµ½Ïà¹ØµÄĿ¼ÏÂ(plugins¡¢features)
²½Öè¶þ£ºÐ½¨EMF Project¡£<!--more-->
²½ÖèÈý£ºÊäÈëÉú³É¹¤³ÌµÄÃû³Æ
µÚËIJ½£ºµ¼ÈëXSD£¬²¢ÇÒÐÞ¸ÄÏàÓ¦µÄÃû³Æ£º
 
 µÚÎå²½£ºµã»÷finish,ÅäÖÃecoreÏà¹ØµÄÊôÐÔ,µã»÷±£´æ
 
 µÚÁù²½£ºÅäÖÃgenmodelµÄÏà¹ØÊôÐÔ
Ñ¡ÖÐËüµÄ¸ùĿ¼£º
ÎÒÃÇÐè ......

java×°ÏäÓë²ðÏä

/**
* ==ºÅÊDZȽÏÁ½¸ö»ù±¾ÀàÐÍÊÇ·ñÏàµÈ,»òÕ߱ȽÏÁ½¸ö¶ÔÏóÒýÓÃÊÇ·ñÏàͬ
*/
public class T {

public static void main(String[] args) {
Integer i1 = 128;
Integer i2 = 128;
int i3 = 128;
int i4 = 128;
Integer i5 = 127;
Integer i6 = 127; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ