Topic
4 replies Latest Post - ‏2012-10-15T11:43:20Z by lecping
lecping
lecping
8 Posts
ACCEPTED ANSWER

Pinned topic Java.lang.UnsatisfiedLinkError no rhapsody in java.library.path

‏2012-10-09T07:09:05Z |
Hello all,

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.

Best regards,
lecping
Updated on 2012-10-15T11:43:20Z at 2012-10-15T11:43:20Z by lecping
  • MerlinUK
    MerlinUK
    106 Posts
    ACCEPTED ANSWER

    Re: Java.lang.UnsatisfiedLinkError no rhapsody in java.library.path

    ‏2012-10-09T10:17:47Z  in response to lecping
    Most 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:

    http://merlinscave.info/Merlins_Cave/Tips_n_Tricks/Entries/2010/3/3_Troubleshooting_Java_Plugins.html

    http://merlinscave.info/Merlins_Cave/Tutorials/Entries/2012/3/1_Helpers__Plugins_or_Standalone.html

    Cheers
    Andy
    • lecping
      lecping
      8 Posts
      ACCEPTED ANSWER

      Re: Java.lang.UnsatisfiedLinkError no rhapsody in java.library.path

      ‏2012-10-15T11:40:44Z  in response to MerlinUK
      Hi 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.

      Cheers!
      lecping
  • SystemAdmin
    SystemAdmin
    1305 Posts
    ACCEPTED ANSWER

    Re: Java.lang.UnsatisfiedLinkError no rhapsody in java.library.path

    ‏2012-10-09T15:32:36Z  in response to lecping
    Hello 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

    Regards,
    Ramona
    • lecping
      lecping
      8 Posts
      ACCEPTED ANSWER

      Re: Java.lang.UnsatisfiedLinkError no rhapsody in java.library.path

      ‏2012-10-15T11:43:20Z  in response to SystemAdmin
      Hi 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!

      Best regards,
      lecping