Home » Eclipse Projects » Rich Client Platform (RCP) » Jogl and Eclipse RCP
Jogl and Eclipse RCP [message #436431] |
Thu, 08 September 2005 10:14 |
Eclipse User |
|
|
|
Originally posted by: sebastien.dilogos.com
Hi everybody,
here is my problem :
I try to use some Jogl code in an Eclipse RCP project (Eclipse 3.1), but I
have the following error message :
Unhandled event loop exception
Reason:
net/java/games/jogl/GLEventListener
I have installed the OpenGL plugin and (I think) everything needed to
work, but it doesn't work !!!
What have I missed ?
Thanks a lot
Seb
|
|
|
Re: Jogl and Eclipse RCP [message #436444 is a reply to message #436431] |
Thu, 08 September 2005 14:45 |
Geoff Draper Messages: 34 Registered: July 2009 |
Member |
|
|
When you say that you've installed the OpenGL plugin, do you mean that =
you've created a new plugin that wraps the jogl.jar file? If so, did yo=
u =
also include the platform-specific library (*.dll for Windows, *.so for =
=
Unix) inside your plugin?
Incidentally, since JOGL uses AWT, are you using the SWT_AWT bridge to =
make it work with RCP? Or through some other mechanism?
On Thu, 08 Sep 2005 04:14:20 -0600, Seb Vandamme <sebastien@dilogos.com>=
=
wrote:
> Hi everybody,
>
> here is my problem :
> I try to use some Jogl code in an Eclipse RCP project (Eclipse 3.1), b=
ut =
> I have the following error message :
>
> Unhandled event loop exception
> Reason:
> net/java/games/jogl/GLEventListener
>
> I have installed the OpenGL plugin and (I think) everything needed to =
=
> work, but it doesn't work !!!
> What have I missed ?
>
> Thanks a lot
>
> Seb
>
|
|
|
Re: Jogl and Eclipse RCP [message #436481 is a reply to message #436444] |
Fri, 09 September 2005 10:12 |
Eclipse User |
|
|
|
Originally posted by: sebastien.dilogos.com
I have installed this plugin :
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/opengl/opengl.html
and I use the gl-win32.dll for Windows XP.
My code look like that :
public void createPartControl(Composite parent) {
Vertical3DView v = new Vertical3DView();
ButtonPanel bp = new ButtonPanel(v);
Canvas canvas = new Canvas(parent, SWT.EMBEDDED);
Frame f = SWT_AWT.new_Frame(canvas);
f.setLayout(new BorderLayout()); f.add(v, BorderLayout.WEST);
f.add(bp, BorderLayout.EAST);
}
where Vertical3DView and ButtonPanel are two Jogl classes.
In a singl SWT application, this code work fine ! Then, what's the problem
with RCP, that's my question... :-)
thanks a lot,
Seb
Geoff Draper wrote:
> When you say that you've installed the OpenGL plugin, do you mean that
> you've created a new plugin that wraps the jogl.jar file? If so, did you
> also include the platform-specific library (*.dll for Windows, *.so for
> Unix) inside your plugin?
> Incidentally, since JOGL uses AWT, are you using the SWT_AWT bridge to
> make it work with RCP? Or through some other mechanism?
> On Thu, 08 Sep 2005 04:14:20 -0600, Seb Vandamme <sebastien@dilogos.com>
> wrote:
>> Hi everybody,
>>
>> here is my problem :
>> I try to use some Jogl code in an Eclipse RCP project (Eclipse 3.1), but
>> I have the following error message :
>>
>> Unhandled event loop exception
>> Reason:
>> net/java/games/jogl/GLEventListener
>>
>> I have installed the OpenGL plugin and (I think) everything needed to
>> work, but it doesn't work !!!
>> What have I missed ?
>>
>> Thanks a lot
>>
>> Seb
>>
|
|
| |
Re: Jogl and Eclipse RCP [message #436484 is a reply to message #436482] |
Fri, 09 September 2005 12:12 |
Eclipse User |
|
|
|
Originally posted by: sebastien.dilogos.com
Thanks for your answer.
I have no static initializer in my jogl classes.
What must I put in my Manifest.MF ? the opengl-swt plugin ? Or the
jogl.jar ?
I put a System.print(Class.forName("net.java.games.jogl.GLEventListener "))
in my plugin initializer, and the message is the following :
java.lang.ClassNotFoundException: net.java.games.jogl.GLEventListener
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:403)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at scenery.rcp.Perspective.createInitialLayout(Perspective.java :13)
at
org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Pers pective.java:696)
at
org.eclipse.ui.internal.Perspective.createPresentation(Persp ective.java:230)
at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:127)
at
org.eclipse.ui.internal.WorkbenchPage.createPerspective(Work benchPage.java:1375)
at
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:896)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:887)
at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.j ava:3051)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3049)
at
org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.java:91)
at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:331)
at
org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:346)
at
org.eclipse.ui.actions.PerspectiveMenu$3.runWithEvent(Perspe ctiveMenu.java:108)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:538)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2713)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at scenery.rcp.Application.run(Application.java:18)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Unhandled event loop exception
Reason:
net/java/games/jogl/GLEventListener
Thanks for your help.
Seb
Alex Blewitt wrote:
> This error message is indicative of a ClassNotFound exception, where the
full exception is 'ClassNotFoundException:
net/java/games/jogl/GLEventListener' but the error message being printed is
(somewhat unhelpfully) 'net/java/games/jogl/GLEventListener'.
> The three most likely causes are:
> 1) It's not in your Manifest.MF, so that it builds (it's in the .classpath)
but not visible at run-time
> 2) The class is visible, but it has a static initialiser that references
another class (e.g. static Log = LogFactory.getLog("x")) that isn't visible.
> 3) The class is visible, but it has a static initialiser that attempts to
load a native library (e.g. System.loadLibrary("graphics") that fails, and
this is translated into a ClassNotFoundException.
> I'd suggest the way to debug it is in your plugin initialiser, do a
System.print(Class.forName("net.java.games.jogl.GLEventListener ")) which will
go through the routine of loading the class and finding any errors that are
necessary. You may even be able to stick a breakpoint on this line and go
through a debugger to find out whether it's the native library or some other
class that it can't find, but the debugger will use the same classpath as the
project builder will.
|
|
|
Re: Jogl and Eclipse RCP [message #436489 is a reply to message #436431] |
Fri, 09 September 2005 13:12 |
Eclipse User |
|
|
|
Originally posted by: alr.agelid.com
Hi,
Actually Jogl IS the openGL's library you use, and then you don't care
about SWT Opengl's one.
The plugin SWT OpenGL is not used there !!
What you need is just add the jogl.jar in the execution library list of
your plugin, you can do that using the plugin.xml editor in the
"execution/runtime" folder.
AND tell the plugin.xml to also export the lib, do that in the
"build.propserties" tab
Let's says your jogl.jar is in the "lib" folder of your plugin, the
build.properties may look like :
...
bin.includes = plugin.xml,\
plugin.properties,\
icons/,\
pluginXXXX.jar,\
lib/
Hope this help,
Arnauld
|
|
|
Re: Jogl and Eclipse RCP [message #436494 is a reply to message #436489] |
Fri, 09 September 2005 13:57 |
Eclipse User |
|
|
|
Originally posted by: sebastien.dilogos.com
Thank you very much for your answer, but it doesn't work... :-(
alr wrote:
> Hi,
> Actually Jogl IS the openGL's library you use, and then you don't care
> about SWT Opengl's one.
> The plugin SWT OpenGL is not used there !!
> What you need is just add the jogl.jar in the execution library list of
> your plugin, you can do that using the plugin.xml editor in the
> "execution/runtime" folder.
> AND tell the plugin.xml to also export the lib, do that in the
> "build.propserties" tab
> Let's says your jogl.jar is in the "lib" folder of your plugin, the
> build.properties may look like :
> ...
> bin.includes = plugin.xml,
> plugin.properties,
> icons/,
> pluginXXXX.jar,
> lib/
> Hope this help,
> Arnauld
|
|
|
Re: Jogl and Eclipse RCP [message #436497 is a reply to message #436494] |
Fri, 09 September 2005 14:59 |
|
For the general case: How do I add 3rd party jar to my common plugin,
here are some steps we figured out this morning.
# for compiling with your jars
1. create your plugin project, and possibly a folder to hold them
<project>/lib
2. import the jar from the filesystem into your <project>/lib directory
3. right click on the jar and "add to build path"
4. right click on the project and do a Build Path>Configure build path
5. export the jar from the Order and Export tab
# this is probably enough for eclipse to allow you to code
# with your jar classes
# for the plugins to work when deployed
6. edit your MANIFEST.MF file
7. On the runtime tab, add your jar to the classpath pane
8. On the runtime tab, add all of the packages you want to export.
# this gets the jars into your plugin, I'm guessing
9. you might have to make sure that the jars are included in a binary
build from the Build tab, I'm not sure.
Later,
PW
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
| | |
Goto Forum:
Current Time: Sun Dec 08 01:09:33 GMT 2024
Powered by FUDForum. Page generated in 0.04694 seconds
|