Eigentlich ist die DLL da, aber bekomme die Fehlermeldung beim MEthodenaufruf:
Exception in thread "main" java.lang.UnsatisfiedLinkError: ioPort.IsInpOutDriverOpen()Z
at ioPort.IsInpOutDriverOpen(Native Method)
at test.main(test.java:13)
Enthält die DLL, den Java-Code und den Screenshot der Fehlermeldung!
http://www28.zippyshare.com/v/J0BZ29Vy/file.html
import java.lang.*;
public class test {
public static void main(String[] args) {
try {
System.load("d:/test/inpoutx64.dll");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
try {
ioPort myPort=new ioPort();
System.out.print(myPort.IsInpOutDriverOpen());
} catch(Exception e) {
System.out.println("Fehler!");
}
} // end of main
} // end of class test
class ioPort{
public native boolean IsInpOutDriverOpen();
// output a value to a specified port address
public native void Out32(short PortAddress, short data);
// input a value from a specified port address
public native short Inp32(short PortAddress);
// load 'jnpout32.dll'
//static { System.loadLibrary("inpoutx64");}
static {
System.load("d:/test/inpoutx64.dll");
}
}
Exception in thread "main" java.lang.UnsatisfiedLinkError: ioPort.IsInpOutDriverOpen()Z
at ioPort.IsInpOutDriverOpen(Native Method)
at test.main(test.java:13)
Enthält die DLL, den Java-Code und den Screenshot der Fehlermeldung!
http://www28.zippyshare.com/v/J0BZ29Vy/file.html
import java.lang.*;
public class test {
public static void main(String[] args) {
try {
System.load("d:/test/inpoutx64.dll");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
try {
ioPort myPort=new ioPort();
System.out.print(myPort.IsInpOutDriverOpen());
} catch(Exception e) {
System.out.println("Fehler!");
}
} // end of main
} // end of class test
class ioPort{
public native boolean IsInpOutDriverOpen();
// output a value to a specified port address
public native void Out32(short PortAddress, short data);
// input a value from a specified port address
public native short Inp32(short PortAddress);
// load 'jnpout32.dll'
//static { System.loadLibrary("inpoutx64");}
static {
System.load("d:/test/inpoutx64.dll");
}
}