I am developing a Java application in Swing.
My application needs the win32com.dll (Java Communication API) and the file javax.comm.properties.
Normally, I just copy the dll to C:\Java\jre1.6\bin and the config file to C:\Java\jre1.6\lib.
The Code I written was :
System.out.println("Loading Library...");
System.out.println("------- " + System.getProperty("java.library.path"));
System.loadLibrary("win32com.dll");
System.out.println("Library Loaded.");
Output :
Loading Library...
------- C:\Program Files\Java\jre1.8.0_66\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_66/bin/server;C:/Program Files/Java/jre1.8.0_66/bin;C:/Program Files/Java/jre1.8.0_66/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Users\user\Desktop;;.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no win32com.dll in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at dotMatrix.TicketView1.main(TicketView1.java:16)
But I getting 'Thread exception' and can't do all that in the target environment.
Is there a way to solve this problem?