Re: Looking for example using SWT GLCanvas
Posted by drstine on Feb 22, 2013; 12:10pm
URL: https://forum.jogamp.org/Looking-for-example-using-SWT-GLCanvas-tp4025603p4028320.html
Hey JOGL Community,
I was away on a C++ project for about four months so haven't been looking at the SWT Canvas problem for a while. The break must have helped my brain because I figured out the ClassNotFoundException just now.
For reference, I'm using Eclipse Juno (4.2) and JOGL rc11 on Win7/64. This is an Eclipse RCP project.
Very simply, my com.jogamp.jogl.rc11 plugin has a run-time dependency on org.eclipse.swt that must be set in a MANIFEST.MF Require-Bundle directive (via the wizard). It's pretty obvious once you see it.
Coming from a fully compiled and linked language such as C++ I find it difficult to track down unresolved dependencies that don't show up at build time. Now I understand that build-time error messages come from the Java compiler and that Eclipse OSGi will report the run-time "link" errors as it tries to load the plugins (bundles).
So now the NewtCanvasSWT integrates nicely with my RCP view Composite and I've successfully built all five ways to use JOGL with windowing toolkits.
Thanks again for a great library.