2 Replies Latest reply: Dec 7, 2010 1:29 AM by 817459 RSS

    Java3D + Newer Eclipse Version -> Access Restriction (solution + question)

    817459
      Current eclipse versions don't go well with java3d. Programs that worked fine before now produce 100s of strange errors, e.g.

         <tt>"Access restriction: The type SimpleUniverse is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\ext\j3dutils.jar"</tt>

      Java3D is installed correctly and everything was (and is) working perfectly well with older eclipse versions. I googled for a solution and found out that changing

         <i>Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API -> Forbidden reference (access rules)</i>

      to <i>"warning / ignore"</i> eliminated the error(s).

      Can anyone explain me what is going on here? Why is Java3D "Deprecated and restricted"? Is the default setting of eclipse correct or oversuspicious? Did I miss anything else? Will the next java3d / eclipse version be fix this? Do I have to fix this?

      Many thanks in advance!
      Ingo
        • 1. Re: Java3D + Newer Eclipse Version -> Access Restriction (solution + question)
          InteractiveMesh
          Hi,

          my Eclipse Helios SDK 3.6.1 installation also shows this behavior, even if all classes of all three Java 3D-jars are declared as accessible in their access rules! See:

          Project -> Properties -> Java Build Path -> Libraries JRE System Library [JavaSE-1.6] -j3dcore.jar, -j3dutils.jar, -vecmath.jar

          I have no idea what is going on here. Following work arounds do the job well without accepting 'forbidden references':

          A. Per project add the three Java 3D-jars to the Libraries and place them on the top:

          Project -> Properties -> Java Build Path -> Libraries AddExternal JARs.. ..\jre6\lib\ext\j3dcore.jar, j3dutils.jar, vecmath.jar
          Project -> Properties -> Java Build Path -> Order and Export Top j3dcore.jar j3dutils.jar vecmath.jar

          B. An alternative is to create and add a 'User Library' in this way:

          Windows -> Preferences -> Java -> Build Path -> User Libraries 1. New: J3DAll, 2. Add JARs.. select all three at ..\jre6\lib\ext\j3dcore.jar, j3dutils.jar, vecmath.jar

          Project -> Properties -> Java Build Path -> Libraries Add Library .. -> User Library -> Next select J3DAll Finish
          Project -> Properties -> Java Build Path -> Order and Export Top J3DAll

          Does this help? August
          • 2. Re: Java3D + Newer Eclipse Version -> Access Restriction (solution + question)
            817459
            Thanks ... at least we are gathering workarounds by now. But who could change that? I wonder if there is still an active developement behind Java3D, the mailing lists I found seem to contain only spam ... it is a pain to explain every student what they have to do do get the libs working.

            Ingo