JAVA里怎么调用DLL中的函数?能具体点吗?非常感谢

解决方案 »

  1.   

    http://topic.csdn.net/t/20020322/22/594333.html
    参考 看看
      

  2.   

    http://www.itpub.net/106333.html
      

  3.   

    java 里面有本地调用   JNI
      很简单的几个类 
      
       但程序的可移植性就丢失了
      

  4.   

    试下 JNative,参考我写的这个:http://www.blogjava.net/Unmi/archive/2006/05/18/124090.html
      

  5.   

    用jna比jni简单。给你一段代码
    public class Geomitry {
    static String strDesktopVersionID;
    public Geomitry() 
    throws ConfigureException, ParserConfigurationException, 
    SAXException, IOException{
    strDesktopVersionID = Global.getCommonFunctionVersionID();
    }

    public interface GeomitryFunc extends com.sun.jna.Library{
    GeomitryFunc INSTANCE = (GeomitryFunc)Native.loadLibrary("GeomLibrary_"+strDesktopVersionID,GeomitryFunc.class);

    //根据面分割线
    public int split_polyline_by_polygon(
    polyline_t.ByReference pPolyline, 
    polygon_t.ByReference pPolygon, 
    PointerByReference ppPolyline);
    }