Dominik Dominik - 5 months ago 24
Java Question

How to include win32com.dll into a jar file?

I am developing a Java application which has to be executed and installed without admin rights. My application needs the

(Java Communication API) and the file

Normally, I just copy the dll to
and the config file to

But I can't do all that in the target environment. Is there a way to solve this problem?

E.g. passing the location of these files to the java command in the command line, or including the files into the jar and load them from the source code?


Yes, you can just use something like this

java -Djava.library.path=/path/to/the/win32com.dll -cp /my/classpath/;/my/classpath2/ my.main.TheClass