私は itlsspproc.dll で作業していますが、次のエラーが発生します
スレッド「メイン」の例外 java.lang.UnsatisfiedLinkError: itl.ssp.proc.ITLSSPProcLoader.OpenSSPComPort(Litl/ssp/proc/ITLSSPProcLoader$SSP_COMMAND;)I at itl.ssp.proc.ITLSSPProcLoader.OpenSSPComPort(Native Method)at itl .ssp.proc.ITLSSPProcLoader.main(ITLSSPProcLoader.java:81)
ここに私のコードがあります
パッケージ itl.ssp.proc;
public class ITLSSPProcLoader {
public class SSP_FULL_KEY
{
long FixedKey;
long EncryptKey;
public SSP_FULL_KEY(long fix, long encr)
{
FixedKey = fix;
EncryptKey = encr;
}
}
public class SSP_COMMAND
{
//string PortNumber;
SSP_FULL_KEY key;
int BaudRate; // baud rate of the packet
int Timeout; // how long in ms to wait for a reply from the slave
String PortNumber; // the serial com port number of the host
String SSPAddress; // the SSP address of the slave
String RetryLevel; // how many retries to the slave for non-response
String EncryptionStatus; // is this an encrypted command 0 - No, 1 - Yes
String CommandDataLength; // Number of bytes in the command
String[] CommandData = new String[255]; // Array containing the command bytes
String ResponseStatus; // Response Status (PORT_STATUS enum)
String ResponseDataLength; // how many bytes in the response
String ResponseData[] = new String[255]; // an array of response data
String IgnoreError; // flag to suppress error box (0 - display,1- suppress)
public SSP_COMMAND(String comport)
{
BaudRate = 9600;
Timeout = 500;
PortNumber = comport;
System.out.println("sagar "+PortNumber);
RetryLevel = "5";
IgnoreError = "0";
EncryptionStatus = "0";
ResponseStatus = "0";
ResponseDataLength = "0";
SSPAddress = "0";
CommandDataLength = "0";
key = new SSP_FULL_KEY(012345670123, 012345670123);
}
}
public native static int OpenSSPComPort (SSP_COMMAND cmd);
public native static int CloseSSPComPort();
public ITLSSPProcLoader()
{
try
{
System.loadLibrary("ITLSSPProc");
System.out.println("library is loaded");
}catch(Exception e)
{
e.printStackTrace();
}
}
public static void main(String args[])
{
ITLSSPProcLoader itl = new ITLSSPProcLoader();
SSP_COMMAND cmd = itl.new SSP_COMMAND("com7");
System.out.println("open port"+OpenSSPComPort(cmd)); //error comes here
System.out.println("close" +CloseSSPComPort());
}
}
i have incuded the dll in project folder and also paste in system32 folder in window directory. i struct on this error please help if any one works on this