Skip to main content

Access restriction - Newby needs a starter help

1 reply [Last post]
jjjx
Offline
Joined: 2010-01-16
Points: 0

Hi @all

first to say: I am absolute newby to java. But I can program DirectX, XNA, C++, C# and so on.

All I wanted, was to start the tutorial from http://java.sun.com/developer/onlineTraining/java3d/

I have made a workspace in eclipse and tried to run the most simple program HelloJava3Da.java which renders a single, rotating cube.

Now it seems some libs can not be found. The messages for these libs are:

import com.sun.j3d.utils.applet.MainFrame;
Access restriction: The type MainFrame is not accessible due to restriction on required library D:\Programme\Java\jre6\lib\ext\j3dutils.jar

import com.sun.j3d.utils.geometry.ColorCube;
Access restriction: The type ColorCube is not accessible due to restriction on required library D:\Programme\Java\jre6\lib\ext\j3dutils.jar

Probably I am doing something very basically wrong.

I see the packages in the package explorer and all the other libs like

import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.event.*;
import java.awt.GraphicsConfiguration;
import com.sun.j3d.utils.universe.*;
import javax.media.j3d.*;
import javax.vecmath.*;

do not have any error messages.

if anyone can give me a starter help here I would be very happy
greetings

Message was edited by: jjjx

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jjjx
Offline
Joined: 2010-01-16
Points: 0

Now back again. Cos I couldn't wait with it I investigated further and it seems the web is filled with this problem.

So I answer the question to my self now and maybe it helps someone of the professionals out there (I am kind a happy its not a newby-problem!):

- The problem has to do with the new eclipse-version.
Best link I found for this is here h**p://blog.js-development.com/2008/11/type-x-is-not-accessible-due-to.html

Basically with new default settings eclipse handles "Forbidden reference" as error and not as warning.

Now that brought my 100 of errors down to one or two.

You find the prefs here in the eclipse menu:
pref./java/compiler/errors/warnings
at the option
Deprecated and restricted API

always look at the bright sight ....

:-)

Message was edited by: jjjx