Menu

java3d: classes from nested jar not visible

2009-03-30
2013-04-26
  • milosz klosowicz

    I have installed java3d 1.5.1 plugin into eclipse RCP 3.4.2 ( Windows XP + SUN JDK 1.6  )
    When creating test plugin, compiler complains about all imported packages from java3d plugin.
    It seems to be the problem with nested jar files: when i'm unpacking nested jar's and put it at the classpath all works OK.

    Have i change something in eclipse configuration to handle correctly nested jars ?

    Milosz

     
    • Aleksandar Ristovski

      No, you should not have to change anything.

      Adding the jars explicitly in the class path defeats the purpose of the plugin.

      Eclipse's class loader is supposed to resolve class path at runtime (and compile time) by reading your plugin's dependencies.

      Did you add java3d plugin in the dependency list of your plug-in?

      You can take a look at demoapp or testapp in SVN for sample code. Svn URL:

      https://java3d-eclipse.svn.sourceforge.net/svnroot/java3d-eclipse/org.java3declipse/trunk/

      ---
      Aleksandar

       
      • milosz klosowicz

        Hello...
        Java3d plugin in added to the dependency list of my test plugin.
        I'v checked that  imported classes are visible after i have imported java3d plugin  into workspace ( Eclipse unpack the plugin jar into workspace project ).
        But in that case my plugin works only inside eclipse. After exporting as RCP product ( all dependencies are OK in runtime/build configuration, and all plugins are contained in exported bundle ), the application throw exception about non existing dll libraries ( i'v checked and native plugin part with native dll for windows exist inside product bundle ).
        The only idea i have now is to  repack the java3d plugin as a single jar , but  i would'nt like to do it with each java3d release ....

         
        • Aleksandar Ristovski

          Why are you importing the plugin? You should be fine by installing it in Eclipse IDE. It will end-up in your eclipse/plugins and eclipse/features directories.

          Then you simply specify dependency in your project. It should compile fine and run fine.

          When you export your application, it should recognize your plugin; when exporting, double-check java3d and it's fragment are both selected.

          If you want, I can take a look at your project setup. Can I download it from somewhere?

           
  • Nobody/Anonymous

    hi folks,

    I have the same problem: all classes from javax.media.j3d,* and com.sun.j3d* are not visible.
    I checked out the demoapp but I am not able to build it.
    the weird thing is, that the the java3d plugin is showing up in the dependency list, but eclipse refuses to build .. even after a clean.
    any hints?

    I'm going mad :@

    thx,

    steven

     
  • Nobody/Anonymous

    the manifest files match. all packages are listed in the Export-Package section.
    eclipse says "The import javax.media cannot be resolved". so, no javax.media.*.* class can be resolved. same for package com.sun.j3d.

    in the error log the following is displayed:

    "Unable to find feature.xml in directory: /home/dieter/bin/eclipse/features/java3d_1.5.1.jar"

    "Unable to find feature.xml in directory: /home/dieter/bin/eclipse/features/org.java3declipse.core_1.1.0.jar"

    "Unable to find feature.xml in directory: /home/dieter/bin/eclipse/features/jogl_1.1.2.jar"

    can a missing feature.xml be a reason for visibility problems?

    do I have to put all java3d fragments into the plugin directory,
    or only the one for my plattform?

    ___
    regards,
    steven

     
  • Nobody/Anonymous

    good night fellas,

    I tried the following:

    -remove dependency to java3d plugin

    -put java3d jars into demoapp plugin and add it to the demoapp's classpath

    now, the demoapp can be compiled!
    Strike!? No!

    At runtime, the classes from java3d exist twice in the osgi runtime: once loaded from the java3d plugin, and again loaded from the demoapp.

    uups.

    it seems that the osgi runtime is capable of locating the java3d classes;
    but the eclipse ide is not able to locate these classes.
    thus, the problem that classes from nested jars can be seen at build time is a configuration problem. right?

    then, where can I configure the eclipse ide, such that it is capable of including the java3d classes hosted by java3d-eclipse plugin into the build process?

    regards,

    steven reinisch

     
  • Aleksandar Ristovski

    Hello Steven,

    Thank you for your patience.

    What is the version of eclipse you are using?

    For compiling applications it should be enough that you install plugin in eclipse and list it as dependency.

    Is your 'demoapp' top-level project? How did you check it out from repository?

    Thanks,

    Aleksandar

     
  • Mirage

    Mirage - 2010-01-25

    This is a known problem: https://bugs.eclipse.org/bugs/show_bug.cgi?id=135012

    To solve this simply build the jar as unpacked (containing packed jars). Eclipse also unpacks plugins containing jar dependencies.

    Quick fix: unpack, for example, jogl_1.1.2.jar to jogl_1.1.2 folder in your platform, and delete jogl_1.1.2.jar.

    Hope it helps

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.