Click here to Skip to main content
15,895,370 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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 :

Java
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?
Posted
Updated 13-Jan-16 21:32pm
v2

1 solution

The message:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no win32com.dll in java.library.path

is quite clear. The loader cannot find the dll anywhere.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900