Sign in to follow this  
Grahf750

[java] Switched IDE 1 code line not working

Recommended Posts

I switched from the Java Studio Enterprise 8 IDE to Eclipse recently. I am using Jogl (Jsr-231) and after switching I have one line of code which doesn't work.
AWTGraphicsConfiguration awtConfig = (AWTGraphicsConfiguration)
       GLDrawableFactory.getFactory().chooseGraphicsConfiguration(caps, null, dev);


The error says: The type javax.media.opengl.GLDrawableFactory cannot be resolved. It is indirectly referenced from required .class files I have added the archive of Jogl files. In the hierarchy of the files I can see GLDrawableFactory.getFactory() and all the other Jogl code works. The same code in Java Studio Enterprise 8 using the same Jogl files runs fine.

Share this post


Link to post
Share on other sites
Quote:
Original post by Grahf750I have added the archive of Jogl files.

What do you mean?

Eclipse maintains a separate classpath for each project in the workspace. Through the properties of the projects that depends on Jogl ("Java Build Path" in the property page, "Build Path" > "Configure Build Path" in the local menu) you should add the Jogl jars in the "Libraries" page ("Add External Jars" button).

If you also want Jogl sources try to open a class without sources and use the "Attach Source..." button that shows up to specify a folder or archive with the sources; avoid creating an Eclipse project containing Jogl sources because it would overlap with the jars.

The classpath settings of a project are listed in a XML file called ".classpath" in the project root directory; post its content if you have further problems.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this