多个dll文件在java中怎么调用
1个回答
展开全部
可以调用,别说是DLL了,就是COM都可以调用的!
class firstJNI
{
public native void displayHelloWorld();
public native void displayOther();
private native String getLine(String prompt);
static {
System.loadLibrary("firstJNI");//This is firstJNI.DLL
/*if generated by borland
System.loadLibrary("firstjni");//This is firstjni.dll
*/
}
public static void main(String[] args)
{
firstJNI JN=new firstJNI();
JN.displayHelloWorld();
JN.displayOther();
String input = JN.getLine("Enter Some Thing ");
System.out.println("You Entered " + input);
}
}
class firstJNI
{
public native void displayHelloWorld();
public native void displayOther();
private native String getLine(String prompt);
static {
System.loadLibrary("firstJNI");//This is firstJNI.DLL
/*if generated by borland
System.loadLibrary("firstjni");//This is firstjni.dll
*/
}
public static void main(String[] args)
{
firstJNI JN=new firstJNI();
JN.displayHelloWorld();
JN.displayOther();
String input = JN.getLine("Enter Some Thing ");
System.out.println("You Entered " + input);
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询