Jump to content
  • Advertisement
Sign in to follow this  
Grahf750

[java] Switched IDE 1 code line not working

This topic is 4275 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!