• Post Reply Bookmark Topic Watch Topic
  • New Topic

Including a DLL in JAR file  RSS feed

 
Kapil Madhok
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using javax.comm to interface with the serial ports and it works well with my IDE(NetBeans).when i try to execute the jar file from the command prompt we get a error like "PORT NOT FOUND".The javax.comm requires a dll file and that is included in my jdk/jre directory.how do i make the jar file to find the dll file?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either the DLL must be in a directory that is in the PATH environment variable, or you must add the directory that contains the DLL to the Java system property java.library.path. For example:

java -Djava.library.path=C:\mydir\that\contains\the\dll -jar myprogram.jar
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!