Eclipse not resolving javax.media.opengl.GL3 import
Asked Answered
S

3

6

I have a Java class that has the following two imports:

import javax.media.opengl.GL;

import javax.media.opengl.GL3;

Eclipse is able to use the attached jar to resolve the first one for GL but it gives me an error on the second one saying it can't resolve the GL3 one.

Sartorial answered 1/4, 2018 at 19:28 Comment(1)
Check this: #7210694Structuralism
I
2

Have you read our instructions for Eclipse in the official JogAmp wiki?

In my humble opinion, you use some JARs of JOGL 1 whereas your source code relies on JOGL <= 2.3.0. The latest version is JOGL 2.3.2 and "javax.media" has been renamed "com.jogamp" (for legal reasons).

Indocile answered 5/4, 2018 at 12:46 Comment(0)
W
0

enter image description herejar file seems to different, please check with different jars and versions. enter image description here

enter image description here

Weiland answered 5/4, 2018 at 12:49 Comment(1)
How does you answer help?Indocile
S
-1

I solved the problem by placing the dll files directly in the /bin folder of my jre directory. I had previously tried placing them in the jdk /bin and in the /lib folder of the eclipse project but neither of those worked.

Sartorial answered 6/4, 2018 at 22:10 Comment(4)
I've downvoted your answer because putting native and Java libraries into the JRE or JDK is a bad practice and can break any software depending on an incompatible version of the same libraries. If you really want to stick with an obsolete version of JOGL, set the Java library path correctly or use "Native location" in Eclipse to tell it where the native libraries are located but the most reliable solution consists in porting your source code to JOGL 2 and to use jogamp-fat.jar which is simple, safer and a lot less error prone than you do.Indocile
ok. thanks for the feedback. i still haven't got this cleaned up. switching an older JOGL/SWT based project over to newer jars etc is proving more confusing to me than I expected but at least now I know what the main causes are. Thanks.Sartorial
Come on, it's mostly a matter of replacing "javax.media.opengl" by "com.jogamp.opengl"...Indocile
Oh, you're right. But the issue I'm running into is more on the SWT side. They seem to have also changed their jars and for some reason running into issues on that side.Sartorial

© 2022 - 2024 — McMap. All rights reserved.