UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

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

UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

asarium
Hello everyone, I'm trying to create an Eclipse plug-in which should use an OpenGL display to display something. Now when I try to load the native library in the plug-in activator using System.load() I get the following error:
java.lang.UnsatisfiedLinkError: F:\[...]\os\win32\x86\nativewindow_awt.dll: Die angegebene Prozedur wurde nicht gefunden
Which corresponds to the English message "The specified procedure could not be found". Using Dependency Walker I checked the dependencies of the DLL and it yielded a dependency to "jawt.dll" as the only non standard DLL. Now if I try to load this DLL before I load the nativewindow DLL I get the same error just with the changed path to the other DLL so I think that the real problem is the JAWT DLL and not the nativewindow DLL.
Did anyone encounter this error before or does anyone have a working JOGL eclipse plug-in that I could add as a dependency?

Thank you for your help
Regards,
asarium
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

Wade Walker
Administrator
Hi Asarium,

Check out my tutorial at http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/. It explains exactly how to make an Eclipse RCP app (which is really just a plugin) that uses Open GL via JOGL 2. The other tutorials on my blog explore other Eclipse-related topics like OpenGL in an editor vs. in a view, and creating installable native binaries.
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

asarium
Thank you very much, I adapted your tutorial and it works
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

gouessej
Administrator
In reply to this post by Wade Walker
Maybe we should provide a standard set of Eclipse plugins to avoid such problems.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

asarium
That would probably be the best, would have saved me some hours trying to get it to work.
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

gouessej
Administrator
I already have some plugins to do this, I assume Wade too. I would like to provide a very simple template or example with them but Wade seems not to trust some of my hacks which are necessary to avoid breaking the debug pipeline.

I would like Sven and Wade to let us know their viewpoints about my suggestion.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

Sven Gothel
Administrator
On Wednesday, July 20, 2011 10:27:11 AM gouessej [via jogamp] wrote:
>
> I already have some plugins to do this, I assume Wade too. I would like to
> provide a very simple template or example with them but Wade seems not to
> trust some of my hacks which are necessary to avoid breaking the debug
> pipeline.
>
> I would like Sven and Wade to let us know their viewpoints about my
> suggestion.

Are we talking about providing an OSGI bundle of JogAmp stuff for Eclipse
and maybe other usage ?

Of course that would be usefull, I guess. Maybe we can even host it.

I am not aware of any problems in the regard, i.e. what you mention about some
difficulties about the debug pipeline etc.
Maybe you both can clarify that somehow and we just propose/offer
one OSGI/Eclipse bundle for discussion ?

Cheers, Sven
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

Wade Walker
Administrator
I thought Julien and Asarium were just talking about providing a premade Eclipse plugin and fragments (one main JOGL plugin plus one fragment per OS/HW platform). This is pretty simple, and would just be a matter of some extra script in the JOGL packaging flow to write out the Eclipse metadata files and zip them up.

As far as I know, this doesn't involve the "hacks" Julien mentioned. Those hacks were for using AWT from within an SWT application, and (I think) are independent of the JOGL plugin structure.
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

Sven Gothel
Administrator
On Wednesday, July 20, 2011 08:55:16 PM Wade Walker [via jogamp] wrote:
>
> I thought Julien and Asarium were just talking about providing a premade
> Eclipse plugin and fragments (one main JOGL plugin plus one fragment per
> OS/HW platform). This is pretty simple, and would just be a matter of some
> extra script in the JOGL packaging flow to write out the Eclipse metadata
> files and zip them up.
>

Sounds great.

JogAmp Eclipse OSGI Bundles (GlueGen, JOAL, JOGL, JOCL)

- Who does it ?

Sure I help, if I get directions. Me not the Eclipse/OSGI guru here :)

> As far as I know, this doesn't involve the "hacks" Julien mentioned. Those
> hacks were for using AWT from within an SWT application, and (I think) are
> independent of the JOGL plugin structure.
>

Ah .. ok.
Maybe Julien can offer his 'workaround' for that problem (?) somehow as well,
if it's of general use ?

Cheers, Sven
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

Wade Walker
Administrator
I can try it, but you'll have to tell me where our packaging script is and how to test it (so I can make sure I don't mess it up).
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

gouessej
Administrator
In reply to this post by Sven Gothel
Sven, I have already offered this workaround, it is in the example that I provided as a test in the following bug report, the code is quite commented:
https://jogamp.org/bugzilla/show_bug.cgi?id=455
This workaround is mandatory on any platform when using JOGL 2 debug pipeline with Eclipse RCP and AWT (GLCanvas).

Wade, it would be fine to provide some examples in the main fragment or in another one, especially an example of use of JOGL in an Eclipse RCP application. That is why I suggested to use my workaround... Maybe we should simply add such an example into the set of existing one and put them all into a fragment.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

Sven Gothel
Administrator
In reply to this post by Wade Walker
On Wednesday, July 20, 2011 09:44:05 PM Wade Walker [via jogamp] wrote:
>
> I can try it, but you'll have to tell me where our packaging script is and
> how to test it (so I can make sure I don't mess it up).

repo: jogamp-scripting

https://jogamp.org/chuck/view/fwd/job/jogamp-scripting-promote-last-builds-master/

The above is the manual kicked off aggregation script:

+++
#!/bin/bash
mkdir -p log
./hudson-builds/promote-latest-builds.sh master secure 2>&1 | tee log/jogamp-scripting-promote-last-builds-master-$(date +%Y%m%d%H%M).log
+++

If this helps as an entry to generate such OSGI bundle, awesome.
Ping me (here, email, chat, ..) if I can help.

ofc .. we still have to try to re-org the final release URLs and bundling,
i.e. Rami, John and I thought it will be nice to have one zip for devs containing
all components, gluegen, .. with the binaries and javadoc.

we also like to have fixed URLs for each (old) version, just in case a user likes to
link to a specific one.

Cheers, Sven
Reply | Threaded
Open this post in threaded view
|

Re: UnsatisfiedLinkError when trying to use JOGL in an Eclipse plugin

Wade Walker
Administrator
Added info about how to alter our aggregation script to create OSGI bundle + fragments to bug 398 (https://jogamp.org/bugzilla/show_bug.cgi?id=398).