getting errors regarding "natives" in Eclipse

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

getting errors regarding "natives" in Eclipse

egc2224
Hi
I am trying to build a java project in Eclipse using one of the older version of JOGL.  The code in the project was written about two years ago and is based on the 1.1.2 version of JOGL.  I was able to figure out how to link to the external jar file, and I found how you double click on it once you add it and open the dialog to show the part where you can link to the native dll file but the files I received with the project seems to be missing some of the required dll files.  does anyone know where I can find the fill set of files that go with the original 1.1.2 version of JOGL.  I have listed the manifest file contents and the native errors below to make clear which version and the issue I am dealing with.
Thanks,
Edward

ps.  i just noticed that the error message is regarding fact that dll/jar is for 32 bit machine and i am on 64 bit laptop.  but i will still need the full copy of JOGL version listed below, but will need it for the 64 bit machine it appears. thanks.

---  from manifest file --------------------------------------------------------------------------

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.4.2_11-b04 (Sun Microsystems Inc.)
Specification-Title: Java Bindings for OpenGL API Specification
Specification-Version: 1.1.2
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: Java Bindings for OpenGL Runtime Environment
Implementation-Version: 1.1.2-pre-20080523-02:11:31
Implementation-Vendor: java.net JOGL community
Extension-Name: javax.media.opengl
Implementation-Vendor-Id: com.sun

--- errors from eclipse console window ------------------------------------------------------
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\Edward\Desktop\FlashDrive\Java\Eclipse\workspace\projectA\lib\windows-i586\jogl.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
        at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
        at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
        at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
        at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
        at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)
        at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.<clinit>(WindowsGLDrawableFactory.java:60)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)
        at com.ct.ogl.viewer.ModelViewer.createContents(ModelViewer.java:607)
        at org.eclipse.jface.window.Window.create(Window.java:431)
        at com.ct.ogl.viewer.ModelViewer.create(ModelViewer.java:461)
        at org.eclipse.jface.window.Window.open(Window.java:790)
        at com.ct.ogl.viewer.ModelViewer.main(ModelViewer.java:340)


Reply | Threaded
Open this post in threaded view
|

Re: getting errors regarding "natives" in Eclipse

Wade Walker
Administrator
From Googling a bit, it looks like JOGL 1.1.2 was a pre-release, and it's getting very hard to find. Is there any reason  you couldn't use 1.1.1a (from http://download.java.net/media/jogl/builds/archive/jsr-231-1.1.1a/) or upgrade to JOGL 2?
Reply | Threaded
Open this post in threaded view
|

Re: getting errors regarding "natives" in Eclipse

egc2224
Thanks for the info.  Just this morning I was googling myself and finally found the archive list you mention below.  I noticed the 1.1.1a build but have not had a chance to try it yet.  I will give it a try and let you know what happens.  The problem I had been having was that since the java code i have was written some time back based on the 1.1.2 prebuild version of jogl but the jogl.jar files i had installed were from the most recent version (in between those two versions a lot of changes took place it seems) i am getting a lot of errors messages stating that the GL.GL_LINE and gl.glvertexf type statments not recoginized.  evidently in the new version of jogl that supports the newer versions of OpenGL changes have been made to some of these constant names and or function names and or argument lists etc.
I am still learning the differences between the older JOGL and the newer JOGL but I found this page that explains how the older version supports the older version of OpenGL and the newer version supports the newer version of OpenGL that uses more of the shader type structuring.
http://jogamp.org/jogl/doc/Overview-OpenGL-Evolution-And-JOGL.html

Having said all of that, I am hoping you are right.  It is my hope that by using a version like 1.1.1a that is at least close to the version my code was written based on, I will be close enough to avoid the issues above.  It seems that might be the case.  I'll give it a try and add an update sharing what I found out.
Thanks for your help,
Edward
Reply | Threaded
Open this post in threaded view
|

Re: getting errors regarding "natives" in Eclipse

egc2224
good news.  I took your advice and tried using the 1.1.1.a version located at the link you provided and it worked.  So, if there is anyone out there who has some code that was written some time back and is based on the pre released 1.1.2 version and need a version to work with on Windows 7, might try above suggested solution.  It worked for me.
Thanks,
Edward
Reply | Threaded
Open this post in threaded view
|

Re: getting errors regarding "natives" in Eclipse

Sven Gothel
Administrator
In reply to this post by egc2224
On 05/23/2012 04:30 PM, egc2224 [via jogamp] wrote:
> I am still learning the differences between the older JOGL and the newer JOGL
> but I found this page that explains how the older version supports the older
> version of OpenGL and the newer version supports the newer version of OpenGL
> that uses more of the shader type structuring.
> http://jogamp.org/jogl/doc/Overview-OpenGL-Evolution-And-JOGL.html
>

The new JOGL supports all versions of
OpenGL (1.1-2.1, 3.0-4.2 and ES1 and ES2),
where the old JOGL only supports OpenGL up to version 2.

You simply have to pick the right OpenGL profile
and you will find the OpenGL 2 enumerates (names) in GL2.

Porting to JOGL2 should be almost as easy as just replacing:
  drawable.getGL() -> drawable.getGL().getGL2()
and
  new GLCapabilities() -> new GLCapabilities(null)

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: getting errors regarding "natives" in Eclipse

Sven Gothel
Administrator
In reply to this post by egc2224
On 05/23/2012 10:18 PM, egc2224 [via jogamp] wrote:
> good news.  I took your advice and tried using the 1.1.1.a version located at
> the link you provided and it worked.  So, if there is anyone out there who has
> some code that was written some time back and is based on the pre released
> 1.1.2 version and need a version to work with on Windows 7, might try above
> suggested solution.  It worked for me.

Good that it works for you, however we cannot advise users
to use the old JOGL, since it is no more maintained.

We can only advise people to port to the current JOGL
spec & implementation as provided on http://jogamp.org,
sometimes referred as JOGL2.

In case you find regressions in the current JOGL
or you have questions using it we are happy to solve them and help.

~Sven