在JAVA中该如何调用dll库中的函数,来执行库函数功能呢,请诸位助我!

解决方案 »

  1.   

    使用JNI技术啊,前提是dll中的方法只是java native方法的实现,若java中没有定义的native方法,是不能在java中调用的。public class test{
       public native void show();   static{
          System.loadLibrary("test");
       }   public static void main(){
             new test().show();
       }
    }编译后产生test.class, 使用javah -jni -classpath . test 生成c类型的头文件test.h
    在VC中创建一个dll project, 实现test.h中给出的接口就行了。
      

  2.   

    那每个库函数怎么调,来使用呢在JAVA中
      

  3.   

    还要自己在VC里编写代码吗?可我不会用VC哦