Results 1 to 1 of 1
  1. #1
    Steffan is offline Member
    Join Date
    Feb 2010
    Posts
    1
    Rep Power
    0

    Thumbs up Access restriction error in eclipse (Solved)

    Hi, I'm trying to include J3D classes (Java3d) into my eclipse project. But when I write for example:
    Java Code:
    import com.sun.j3d.utils.universe.SimpleUniverse;
    Then I get an error saying "Access restriction: The type SimpleUniverse is not accessible due to restriction on required library C:\Programfiler\Java\jre6\lib\ext\j3ddutils.jar"

    The jar's is locked, because all files in "program files" always is locked. Could this be the problem? If so; How to get eclipse to change the classpath to another file with the J3D jar's?

    Also when I compile and run I get:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem at IEC3D.main(IEC3D.java:25)
    Here is my whole code:
    Java Code:
    import com.sun.j3d.utils.universe.SimpleUniverse;
    
    import com.sun.j3d.utils.geometry.ColorCube;
    
    import javax.media.j3d.BranchGroup;
    
    public class IEC3D {
    
    public IEC3D()
    
    {
    
       SimpleUniverse universe = new SimpleUniverse();
    
       BranchGroup group = new BranchGroup();
    
       group.addChild(new ColorCube(0.3));
    
       universe.getViewingPlatform().setNominalViewingTransform();
    
       universe.addBranchGraph(group);
    
    }
    
    public static void main( String[] args ) {
    
       new IEC3D();
    
    }
    
    } // end of class Hello3d
    Edit:
    I found the problem, and suddenly it was fixed. I doesn't exactly know how it got fixed, but it was something with the path access... I think I included a path to some other jar's where I got access.
    Last edited by Steffan; 02-03-2010 at 04:32 PM. Reason: Found problem

Similar Threads

  1. Error: Access restriction
    By livnihai in forum Eclipse
    Replies: 1
    Last Post: 11-25-2009, 06:53 PM
  2. Replies: 1
    Last Post: 03-24-2009, 12:52 PM
  3. How to access MySQL Database in Eclipse 3.2
    By nijava in forum Eclipse
    Replies: 2
    Last Post: 12-12-2008, 03:04 PM
  4. Can we lift the images restriction?
    By Cyorxamp in forum Suggestions & Feedback
    Replies: 30
    Last Post: 07-01-2008, 08:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •