I am trying to make an application using Eclipse.
Library of rhapsody.jar is included into the buildpath (Eclipse->properties->buildpath->library)and rhapsody.dll is set as classpath of window.
After exporting all the script into runnable .jar and i tried to run the exported runnable .jar
It didn't work and show Java.lang.UnsatisfiedLinkError no rhapsody in java.library.path in cmd.
Does anyone have helpful tips for me, e.g. what is the cause of this problem?
Thank you very much.
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
4 replies Latest Post - 2012-10-15T11:43:20Z by lecping
Pinned topic Java.lang.UnsatisfiedLinkError no rhapsody in java.library.path
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-10-15T11:43:20Z at 2012-10-15T11:43:20Z by lecping
MerlinUK 270001F2TU106 PostsACCEPTED ANSWER
Re: Java.lang.UnsatisfiedLinkError no rhapsody in java.library.path2012-10-09T10:17:47Z in response to lecpingMost likely you arent including the classpath when you run it. How are you building the JAR ? you need to ensure the manifest contains the correct paths
Also see here:
Re: Java.lang.UnsatisfiedLinkError no rhapsody in java.library.path2012-10-15T11:40:44Z in response to MerlinUKHi Andy,
Thanks a lot for the tips! I exported Runnable .jar file with an automatically created manifest file. I thought that the library must be included in window environment. So i did add another classpath directed to rhapsody.dll in window environment.
It still didn't work when i was trying to compile it using cmd.
After i called javaw as command and included classpath and library into the .hep file. It did work now.
SystemAdmin 110000D4XK1305 PostsACCEPTED ANSWER
Re: Java.lang.UnsatisfiedLinkError no rhapsody in java.library.path2012-10-09T15:32:36Z in response to lecpingHello lecping,
Did you export the jar file as Runnable JAR file?
When launching the jar file, did you set -Djava.library.path with Rhapsody_installation_directory\Share\JavaAPI and add in classpath Rhapsody_installation_dir\Share\JavaAPI\rhapsody.jar?
I mean something like this:
d:\>java -Djava.library.path=c:\LegacyApp\Rhapsody_7612\Share\JavaAPI -classpath
.;c:\LegacyApp\Rhapsody_7612\Share\JavaAPI -jar runnable.jar
Re: Java.lang.UnsatisfiedLinkError no rhapsody in java.library.path2012-10-15T11:43:20Z in response to SystemAdminHi Ramona,
I see, I added another classpath in window enviroment directed to Rhapsody.dll and wrote System.load("rhapsody") in the main class of my runnable .jar.
Then i added classpath as stated by you in the .hep file. Now it works.
Thanks a lot!