Skip to main content
gamedev.net
🔒 Locked

[java] Switched IDE 1 code line not working

Started by Grahf750 0 replies 900+ views
Original Post
Grahf750
Grahf750
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.
LorenzoGatti
LorenzoGatti
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.
Omae Wa Mou Shindeiru

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.