用JNI
System.loadLibrary("dll类库")

解决方案 »

  1.   

    liqingh():   请问能说得具体一点吗?最好有一小段代码~
       我JAVA才刚入门呢  :)   先谢谢啦~
      

  2.   

    1.在一个类中定义本地化方法,例如public void native hello();
    2.在类中加入static { System.LoadLibrary("hello.dll");}
    3.在该类中完成代码后编译
    4.在dos下运行javah -jni (*).class
    5.使用VC新建一个动态链接库的工程hello,加入上面生成的.h文件,使用该工程连接已有的C代码的dll。步骤比较多,建议你上网搜一下jni的文章,会介绍的比较详细。
      

  3.   

    public native int jtQuery(String id,String host,);
        public native int jtGet();
        public native int jtSub(String id, host);
        public native String jtGetStra();
        public native int  jtCheck(String id,String host);    public native String jtGetMsg();    static {   System.loadLibrary("dll");//调入本地库
        }
      

  4.   

    to 各位大侠:
    用java调用c的.h 文件和.lib库文件是不是很复杂啊。我看不大懂~
      

  5.   

    供你参考:
    http://blog.csdn.net/iceandfire/archive/2004/09/01/91622.aspx