Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Jars in Jar -Works in build path, not if mvd

Help
2008-02-27
2013-05-23
  • Hello,
         First off, I am completely new at this.
    I am using the eclipse plugin to create a fat jar file that contains some other jar files that were necessary to create the project.  So under Project, properties, Java build path I have the "JRE System Library" j2re1.4.2_16.  I also have two jar files that are in different locations in than my root project.  One is in C:\Program Files\Borland\CaliberRM SDK 6.51\lib\CaliberRMSDK651.jar and the other is in
    C:\Program Files\Borland\Java\Sun1.4.2_03\lib\rt.jar

    I added these extra jars by doing "Add external Jars."

    My project is in directory "C:\Eclipse\CaliberAnalysis"

    I can execute the project from inside eclipse.  Also, if I right click on the project and select Build fat jar and set the main class up, the created fat jar will run.  Also, if I select the project and do fat jar exporter, I will get another fat jar that will run.

    However, these fat jars ONLY WORK IN THE PATH WHERE I MADE THE BUILD.  Why is this?

    For example, if I move the fat jars to my desktop and run them from the command prompt I get this:

    C:\>java -jar CaliberAnalysis_fat.jar
    Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jvb in
    java.library.path
            at java.lang.ClassLoader.loadLibrary(Unknown Source)
            at java.lang.Runtime.loadLibrary0(Unknown Source)
            at java.lang.System.loadLibrary(Unknown Source)
            at com.starbase.caliber.external.Integration.<clinit>(Integration.java:3
    2)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at com.starbase.caliber.external.IntegrationID.class$(IntegrationID.java
    :18)
            at com.starbase.caliber.external.IntegrationID.<init>(IntegrationID.java
    :16)
            at com.starbase.caliber.Project.<init>(Project.java:93)
            at com.starbase.caliber.ProjectManager.getFromServer(ProjectManager.java
    :279)
            at com.starbase.caliber.ProjectManager.getAllProjects(ProjectManager.jav
    a:151)
            at com.starbase.caliber.Session.getProjects(Session.java:715)
            at caliberanalysis.CaliberAnalysis.<init>(CaliberAnalysis.java:720)
            at caliberanalysis.CaliberAnalysis$6.run(CaliberAnalysis.java:497)
            at java.awt.event.InvocationEvent.dispatch(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)

    I tried moving the two CaliberRMSDK651.jar and rt.jar into the root directory of my project and building the fat jars with these inside.  I still get the same results.  What on earth am I missing?

    Thank you