JOGL_in_SWT: Compile failure with sbt

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

JOGL_in_SWT: Compile failure with sbt

Tully
I'm trying to compile the code using Sbt from the following joamp tutorial:
    http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing#JOGL_in_SWT

Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3 x86_64 GNU/Linux
Scala version 2.10.3
Java version "1.8.0_05" Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Sbt version 0.13.2

The source code does not compile with javac returning the following error:

.ivy2/cache/org.jogamp.jogl/jogl-all/jars/jogl-all-2.1.5.jar(javax/media/nativewindow/AbstractGraphicsDevice.java):43: error: cannot access Debug
[error] import jogamp.nativewindow.Debug;
[error]                           ^
[error]   bad source file: /home/tully/.ivy2/cache/org.jogamp.jogl/jogl-all/jars/jogl-all-2.1.5.jar(jogamp/nativewindow/Debug.java)
[error]     file does not contain class jogamp.nativewindow.Debug
[error]     Please remove or make sure it appears in the correct subdirectory of the sourcepath.
[error] (compile:compile) javac returned nonzero exit code
Reply | Threaded
Open this post in threaded view
|

Re: JOGL_in_SWT: Compile failure with sbt

Tully
Including the error message again, as the top got trimmed off in the previous post.

[debug] Forking javac: javac @/tmp/sbt_7e15e0b5/argfile
[error] .ivy2/cache/org.jogamp.jogl/jogl-all/jars/jogl-all-2.1.5.jar(jogamp/opengl/Debug.java):50: error: duplicate class: jogamp.opengl.Debug
[error] public class Debug extends PropertyAccess {
[error]              ^
[error] .ivy2/cache/org.jogamp.jogl/jogl-all/jars/jogl-all-2.1.5.jar(javax/media/nativewindow/AbstractGraphicsDevice.java):43: error: cannot access Debug
[error] import jogamp.nativewindow.Debug;
[error]                                                    ^
[error]   bad source file: .ivy2/cache/org.jogamp.jogl/jogl-all/jars/jogl-all-2.1.5.jar(jogamp/nativewindow/Debug.java)
[error]     file does not contain class jogamp.nativewindow.Debug
[error]     Please remove or make sure it appears in the correct subdirectory of the sourcepath.
[debug] javac returned exit code: 1
[error] (compile:compile) javac returned nonzero exit code
Reply | Threaded
Open this post in threaded view
|

Re: JOGL_in_SWT: Compile failure with sbt

gouessej
Administrator
Hi

The class jogamp.nativewindow.Debug is in jogl-all.jar in this archive:
http://jogamp.org/deployment/v2.1.5/archive/jogamp-all-platforms.7z

JOGL isn't to blame. Sorry but we can't test all build tools. I have never tested JOGL with Apache Ivy and SBT.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Solved: JOGL_in_SWT: Compile failure with sbt

Tully
Thanks for your quick reply I appreciate it is impossible to test all automatic dependency management tools.

I switched to version 2.1.4 and was able to successfully compile and run the JOGL example snippet from wikipedia (http://en.wikipedia.org/wiki/Java_OpenGL)

Looking more closely at the 2.1.5 versions of the jog-all and gluegen-rt jar files it became clear that they contain no compiled class files but in fact the sources! I have included the output from the SBT to see where it downloaded the suspect jar files from:

MavenRepository("jogamp", "http://jogamp.org/deployment/maven")

[info] downloading http://repo1.maven.org/maven2/org/jogamp/gluegen/gluegen-rt/2.1.5/gluegen-rt-2.1.5.jar ...
[info] [SUCCESSFUL ] org.jogamp.gluegen#gluegen-rt;2.1.5!gluegen-rt.jar (3047ms)
[info] downloading http://repo1.maven.org/maven2/org/jogamp/gluegen/gluegen-rt/2.1.5/gluegen-rt-2.1.5-natives-linux-amd64.jar ...
[info] [SUCCESSFUL ] org.jogamp.gluegen#gluegen-rt;2.1.5!gluegen-rt.jar (454ms)
[info] downloading http://repo1.maven.org/maven2/org/jogamp/jogl/jogl-all/2.1.5/jogl-all-2.1.5.jar ...
[info] [SUCCESSFUL ] org.jogamp.jogl#jogl-all;2.1.5!jogl-all.jar (16340ms)
[info] downloading http://repo1.maven.org/maven2/org/jogamp/jogl/jogl-all/2.1.5/jogl-all-2.1.5-natives-linux-amd64.jar ...
[info] [SUCCESSFUL ] org.jogamp.jogl#jogl-all;2.1.5!jogl-all.jar (605ms)
[info] Done updating.
Reply | Threaded
Open this post in threaded view
|

Re: Solved: JOGL_in_SWT: Compile failure with sbt

gouessej
Administrator
Yes, use JOGL 2.1.5-01 from Maven and it should work.
Julien Gouesse | Personal blog | Website