o*****l 发帖数: 539 | 1 I am using java comm to do some serial port communication project.
win32com.dll(driver) is put in c:\windows\system32.
OS is windows 7.
If I run the application from Netbeans IDE, everything works fine.
If I run from command line "java -jar xx.jar", got following error:
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no
SolarisSerialParallel in java.library.path
Caught java.lang.UnsatisfiedLinkError: com.sun.comm.SolarisDriver.
readRegistrySerial(Ljava/util/Vector;Ljava/lang/String | u****s 发帖数: 2186 | 2 PATH?
if you load DLL from Windows, the dll file shoule be in PATH.
Netbeans could have set some environment values.
If you run from command line, it use the %PATH% variable set by OS System/
User
you can also set it from command line, so it only affects the command line
window you are running.
【在 o*****l 的大作中提到】 : I am using java comm to do some serial port communication project. : win32com.dll(driver) is put in c:\windows\system32. : OS is windows 7. : If I run the application from Netbeans IDE, everything works fine. : If I run from command line "java -jar xx.jar", got following error: : Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no : SolarisSerialParallel in java.library.path : Caught java.lang.UnsatisfiedLinkError: com.sun.comm.SolarisDriver. : readRegistrySerial(Ljava/util/Vector;Ljava/lang/String
| g*****g 发帖数: 34805 | 3 It's better to copy the dll as one of your resource file
and bundle with it.
【在 u****s 的大作中提到】 : PATH? : if you load DLL from Windows, the dll file shoule be in PATH. : Netbeans could have set some environment values. : If you run from command line, it use the %PATH% variable set by OS System/ : User : you can also set it from command line, so it only affects the command line : window you are running.
|
|