JAVAµ÷DLL,.JNI¼¼Êõʵ¼ù
¼øÓÚÅÀ³æ¿ª·¢ÐèÒªÒ»¸öͼƬ½âÎö¹¦Äܵĺ¯Êý£¬µ½ÍøÂçÉϲéÕÒÁËһЩjni·½ÃæµÄÄÚÈÝ£¬²¢×öÁË×Ô¼ºµÄһЩÐ޸ģ¬¾ßÌåÈçÏ£º
Ä¿Ç°javaÓëdll½»»¥µÄ¼¼ÊõÖ÷ÒªÓÐ3ÖÖ£ºjni£¬jawinºÍjacob¡£Jni£¨Java Native Interface£©ÊÇsunÌṩµÄjavaÓëϵͳÖеÄÔÉú·½·¨½»»¥µÄ¼¼Êõ£¨ÔÚwindows\linuxϵͳÖУ¬ÊµÏÖjavaÓënative method»¥µ÷£©¡£Ä¿Ç°Ö»ÄÜÓÉc/c++ʵÏÖ¡£ºóÁ½¸ö¶¼ÊÇsourceforgeÉϵĿªÔ´ÏîÄ¿£¬Í¬Ê±Ò²¶¼ÊÇ»ùÓÚjni¼¼ÊõµÄwindowsϵͳÉϵÄÒ»¸öÓ¦Óÿ⡣Jacob£¨Java-Com Bridge£©ÌṩÁËjava³ÌÐòµ÷ÓÃmicrosoftµÄcom¶ÔÏóÖеķ½·¨µÄÄÜÁ¦¡£¶ø³ýÁËcom¶ÔÏóÍ⣬jawin£¨Java/Win32 integration project£©»¹¿ÉÒÔwin32-dll¶¯Ì¬Á´½Ó¿âÖеķ½·¨¡£¾Í¹¦ÄܶøÑÔ£ºjni >> jawin>jacob£¬Æä´óÖµĽṹÈçÏÂͼ£º
jni¼¼ÊõÌåϵ¹¦Äܽṹͼ
¾ÍÒ×ÓÃÐÔ¶øÑÔ£¬ÕýºÃÏà·´£ºjacob>jawin>>jni¡£
Jvm·â×°Á˸÷ÖÖ²Ù×÷ϵͳʵ¼ÊµÄ²îÒìÐÔµÄͬʱ£¬ÌṩÁËjni¼¼Êõ£¬Ê¹µÃ¿ª·¢Õß¿ÉÒÔͨ¹ýjava³ÌÐò£¨´úÂ룩µ÷Óõ½²Ù×÷ϵͳÏà¹ØµÄ¼¼ÊõʵÏֵĿ⺯Êý£¬´Ó¶øÓëÆäËû¼¼ÊõºÍϵͳ½»»¥£¬Ê¹ÓÃÆäËû¼¼ÊõʵÏÖµÄϵͳµÄ¹¦ÄÜ£»Í¬Ê±ÆäËû¼¼ÊõºÍϵͳҲ¿ÉÒÔͨ¹ýjniÌṩµÄÏàÓ¦ÔÉú½Ó¿Ú¿ªµ÷ÓÃjavaÓ¦ÓÃϵͳÄÚ²¿ÊµÏֵŦÄÜ¡£
ÔÚwindowsϵͳÉÏ£¬Ò»°ã¿ÉÖ´ÐеÄÓ¦ÓóÌÐò¶¼ÊÇ»ùÓÚnativeµÄPE½á¹¹£¬windowsÉϵÄjvmÒ²ÊÇ»ùÓÚnative½á¹¹ÊµÏֵġ£JavaÓ¦ÓÃÌåϵ¶¼Êǹ¹½¨ÓÚjvmÖ®ÉÏ¡£
WindowsϵͳÉϵÄjavaÌåϵ
Jni¶ÔÓÚÓ¦Óñ¾ÉíÀ´Ëµ£¬¿ÉÒÔ¿´×öÒ»¸ö´úÀíģʽ¡£¶ÔÓÚ¿ª·¢ÕßÀ´Ëµ£¬ÐèҪʹÓÃc/c++À´ÊµÏÖÒ»¸ö´úÀí³ÌÐò£¨jni³ÌÐò£©À´Êµ¼Ê²Ù×÷Ä¿±êÔÉúº¯Êý£¬java³ÌÐòÖÐÔòÊÇjvmͨ¹ý¼ÓÔز¢µ÷ÓôËjni³ÌÐòÀ´¼ä½ÓµØµ÷ÓÃÄ¿±êÔÉúº¯Êý¡£
Jniµ÷Óùý³ÌʾÒâͼ
l Jni³ÌÐò¿ª·¢µÄÒ»°ã²Ù×÷²½ÖèÈçÏ£º
1. ±àдjavaÖеĵ÷ÓÃÀ࣬²¢ÓÃjavac °üÃû.*.java ÃüÁî µÃµ½¸Ãµ÷ÓÃÀàµÄclassÎļþ
2. ÓÃjavah °üÃû.* Éú³Éc/c++ÔÉúº¯ÊýµÄÍ·Îļþ
3. c/c++Öе÷ÓÃÐèÒªµÄÆäËûº¯Êý¹¦ÄÜ£¬ÊµÏÖÔÉúº¯Êý(ÔÔòÉÏ¿ÉÒÔµ÷ÓÃÈκÎ×ÊÔ´)
4. ½«ÏîÄ¿ÒÀÀµµÄËùÓÐÔÉú¿âºÍ×ÊÔ´¼ÓÈëµ½javaÏîÄ¿µÄjava.library.path
5. Éú³Éjavaµ÷ÓÃÀà¶ÔÓ¦µÄdll¿â
6. ·¢²¼javaÓ¦ÓúÍdll¿â
l
Ïà¹ØÎĵµ£º
XMLÏÖÔÚÒѾ³ÉΪһÖÖͨÓõÄÊý¾Ý½»»»¸ñʽ,ËüµÄƽ̨ÎÞ¹ØÐÔ,ÓïÑÔÎÞ¹ØÐÔ,ϵͳÎÞ¹ØÐÔ,¸øÊý¾Ý¼¯³ÉÓë½»»¥´øÀ´Á˼«´óµÄ·½±ã¡£¶ÔÓÚXML±¾ÉíµÄÓ﷨֪ʶÓë¼¼Êõϸ½Ú,ÐèÒªÔĶÁÏà¹ØµÄ¼¼ÊõÎÄÏ×,ÕâÀïÃæ°üÀ¨µÄÄÚÈÝÓÐDOM(Document Object Model),DTD(Document Type Definition),SAX(Simple API for XML),XSD(Xml Schema Definition),XSLT(Exten ......
javaÏ̳߳صÄÔÀíÓëʵÏÖ
[·ÖÏí]Java Ï̳߳صÄÔÀíÓëʵÏÖ2008-07-18
14:53------------------------------------------------------------------------------------------------
Õ⼸ÌìÖ÷ÒªÊÇ¿ñ¿´Ô´³ÌÐò£¬ÔÚÃÖ²¹ÁËһЩÒÔǰ֪ʶ¿Õ°×µÄͬʱ£¬Ò²Ñ§»áÁ˲»ÉÙеÄ֪ʶ£¨±ÈÈç NIO£©£¬»òÕß³ÆΪм¼Êõ°É ......
ÉùÃ÷£º
ÒÔϵÄÀý×Ó²»Ò»¶¨ÕýÈ·£¬Ö»ÊÇΪÁËÑÝʾ´ó¸ÅµÄÁ÷³Ì¡£
Ò»£ºÎÞ·µ»ØÖµµÄ´æ´¢¹ý³Ì
´æ´¢¹ý³ÌΪ£º
CREATE OR REPLACE PROCEDURE TESTA(PARA1 IN VARCHAR2,PARA2 IN VARCHAR2) AS
BEGIN
INSERT INTO HYQ.B_ID (I_ID,I_NAME) VALUES (PARA1, PARA2);
END TESTA;
È»ºóÄØ£¬ÔÚjavaÀïµ÷ÓÃʱ¾ÍÓÃÏÂÃæµÄ´ ......
´úÂëÈçÏ£º
¡¡¡¡ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
¡¡¡¡package com.example.pinyin.demo2;
¡¡¡¡import net.sourceforge.pinyin4j.PinyinHelper;
¡¡¡¡import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
¡¡¡¡import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
¡¡¡¡import net.sourceforge.pinyin4j.form ......
File f=new File("DerectoryName");
String []results=f.list();
import java.io.*;
¡¡¡¡public class listFile
¡¡¡¡{ &nb ......