Is the current JOGL build broken? I am trying to build JOGL using Java 7 (32-bit) on Windows 7 (64-bit) and get the following error:
c.build.nativewindow.windowlib.windows: [javah] Error: Class com.jogamp.common.nio.PointerBuffer could not be found. BUILD FAILED D:\JOGL\jogl\make\build.xml:69: The following error occurred while executing this line: D:\JOGL\jogl\make\build-nativewindow.xml:683: compilation failed Maybe it's a Java 7 thing? Thanks, -Qu0ll |
Sorry, my mistake, I was building from Sven's repository instead of the offical JogAmp one.
|
Looks like I spoke too soon... it's happening in the official JOGL repository as well :-(
Any ideas? |
Administrator
|
In reply to this post by Qu0ll
On Tuesday, August 02, 2011 12:28:47 AM Qu0ll [via jogamp] wrote:
> > Is the current JOGL build broken? I am trying to build JOGL using Java 7 > (32-bit) on Windows 7 (64-bit) and get the following error: > > c.build.nativewindow.windowlib.windows: > [javah] Error: Class com.jogamp.common.nio.PointerBuffer could not be > found. > PointeRBuffer, is in GlueGen. Pls read the HowToBuild .. (see jogamp.org) in this regard. ~Sven |
As far as I am aware I am doing what I have always done which seems to be in line with the build instructions. I have checked-out the source and am running ant from the jogl/make directory as I have always done. I can see that gluegen is present and that particular class is present as well.
Obviously I am missing some key step, any idea which one it is? Sure it's not Java 7 related? |
In reply to this post by Sven Gothel
As far as I am aware I am doing what I have always done which seems to be in line with the build instructions. I have checked-out the source and am running ant from the jogl/make directory as I have always done. I can see that gluegen is present and that particular class is present as well.
Obviously I am missing some key step, any idea which one it is? Sure it's not Java 7 related? |
Administrator
|
Hi
I succeeded in building JOGL 2 a few days ago, I only had to build it in command line the first time as one of the project failed to be compiled from Eclipse. I don't use Java 1.7 but I think that your problem has nothing to do with it. Try to use the 64 bits VM instead of the 32 bits VM.
Julien Gouesse | Personal blog | Website
|
I have tried both 64-bit and 32-bit Java and am now very baffled. I am doing exactly the same thing which has successfully built JOGL for ages, the only thing I have changed is from Java 6 to Java 7.
|
Administrator
|
I tried it earlier this morning (32-bit Java 7 on Windows XP) and got the exact same error. I'll try to investigate this after work today. You might try "ant -v" or "ant -debug" in the meantime to try to find the reason for this error.
|
Administrator
|
This post was updated on .
In reply to this post by Qu0ll
Maybe there is another error. I assume com.jogamp.common.nio.PointerBuffer cannot be found because its compilation failed.
In Java 1.7, some very low level classes have been renamed (sun.misc.*). I look at the source code now. Edit.: I haven't found what is wrong. Can someone tell me if you have another error message?
Julien Gouesse | Personal blog | Website
|
Administrator
|
On Tuesday, August 02, 2011 04:05:10 PM gouessej [via jogamp] wrote:
> > Maybe there is another error. I assume com.jogamp.common.nio.PointerBuffer > cannot be found because its compilation failed. hence I mentioned the gluegen requirement .. hmm or did javah's usage change ? weird. > > In Java 1.7, some very low level classes have been renamed (sun.misc.*). I > look at the source code now. thank you. ~Sven |
Administrator
|
In reply to this post by Qu0ll
BufferFactoryInternal is the only class using sun.misc.*, NativeTaglet uses com.sun.*. Oracle had planned to rename packages containing "sun" but I don't know if it has been done in Java 1.7.
Julien Gouesse | Personal blog | Website
|
AFAICT, all "sun" named classes have been renamed or removed in Java 7. Everything is now under "java." or "javax." with the exception of some CORBA and XML classes.
The error message I provided is the only error message I am getting during the compile. |
Administrator
|
I found the problem last night. Apparently javah has changed slightly in Java 1.7. In Java 1.6, when you ran javah on GDI.java, it didn't require that PointerBuffer.class be in the classpath, even though PointerBuffer is used in some parameter lists in GDI.java. In Java 1.7, javah does require that PointerBuffer.class be in the classpath.
To fix the build, find the target "c.build.nativewindow.windowlib.windows" in jogl/make/build-nativewindow.xml, and change classpath from "${classes}" to "${classes}:${gluegen.root}/build/classes". I've tested this on Windows and Linux, and it works on both. |
Administrator
|
On Wednesday, August 03, 2011 04:31:12 PM Wade Walker [via jogamp] wrote:
> > I found the problem last night. Apparently javah has changed slightly in Java > 1.7. In Java 1.6, when you ran javah on GDI.java, it didn't require that > PointerBuffer.class be in the classpath, even though PointerBuffer is used > in some parameter lists in GDI.java. In Java 1.7, javah does require that > PointerBuffer.class be in the classpath. > > To fix the build, find the target "c.build.nativewindow.windowlib.windows" > in jogl/make/build-nativewindow.xml, and change classpath from "${classes}" > to "${classes}:${gluegen.root}/build/classes". I've tested this on Windows > and Linux, and it works on both. > > great, thx re: sun packages, wonder if ole AWT stuff (GLCanvas) still works then :) it uses a bunch of non std classes to query native details. ~Sven |
Thanks Wade, I can confirm that the build now works with that modification.
However, are you able to run the demos of the new text renderer? I get the following running com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo02: Exception in thread "main" java.lang.NoClassDefFoundError: android/content/Context at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at com.jogamp.common.util.ReflectionUtil.getMethod(ReflectionUtil.java:244) at com.jogamp.common.util.AndroidPackageUtil.<clinit>(AndroidPackageUtil.java:42) at com.jogamp.common.util.JogampVersion.<init>(JogampVersion.java:58) at com.jogamp.common.GlueGenVersion.<init>(GlueGenVersion.java:40) at com.jogamp.common.GlueGenVersion.getInstance(GlueGenVersion.java:51) at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1174) at javax.media.opengl.GLProfile.access$000(GLProfile.java:71) at javax.media.opengl.GLProfile$1.run(GLProfile.java:112) at java.security.AccessController.doPrivileged(Native Method) at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:110) at com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo02.main(GPUTextNewtDemo02.java:60) Caused by: java.lang.ClassNotFoundException: android.content.Context at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 14 more Are there any new requirements to run these demos? |
Hmm, this may apply to all the demos. I get it running demos.gears.Gears as well :-(
|
Hmm, I did a rebuild and all is well now. I can successfully run both of those demos :-)
|
Administrator
|
Glad this works -- you had me scared for a moment
|
OK, having just checked out the latest source a few moments ago, I am now getting a different error when I try to build with Java 7 and it appears to be a similar javah related problem:
c.configure: c.build.newt.prepare: [javah] Error: Class javax.media.nativewindow.NativeWindow could not be found. BUILD FAILED D:\JOGL\jogl\make\build.xml:77: The following error occurred while executing this line: D:\JOGL\jogl\make\build-newt.xml:561: compilation failed This happens right near the end of the build. Any ideas how to work around this one? |
Free forum by Nabble | Edit this page |