Hello there,
I've been struggling along with JOGL for the last few months, using it for simulations for a java physics engine I'm building as an exploratative project. I decided to package up an easily distributable demo to showcase my current progress but have come unstuck... I followed Wade Walker's excellent tutorial on creating native binary .exes (which entailed porting my code from Netbeans to Eclipse and AWT to SWT using AWT-SWT bridge) and can now run the code successfully from within Eclipse, but when I export the project the .exe doesn't run correctly: a window appears as normal, but the JOGL view tab simply displays the error: "Could not create the view: no gluegen-rt in java.library.path" I've fiddled and tweaked and tried to ensure that the project includes the right libraries; the .jar files do appear in the plugins folder as I would expect so I'm a bit stumped as to why it doesn't run. Anyone got any ideas? More than happy to provide source / further info, but not sure what you'd need to see! Thanks! Tom |
Administrator
|
Hi
As far as I know, SWT does not work in managed environments (applets, Java Web Start), you're stuck with your executable file. Do you set the java.library.path somewhere? I'm not sure the automatic deployment of native libraries work in your case, you might have to set the Java library path and to put the native libraries (DLL under Windows) into it.
Julien Gouesse | Personal blog | Website
|
Hi, thanks for your quick response!
Not too worried about deployment to applets etc - my objective is an .exe that I can distribute myself and that "just works" for a windows end user regradless of their system setup (although we can assume they have a JVM/JRE). I only used SWT as the tutorial/eclipse was set up for that. The tutorial creates some Eclipse plug-ins and adds the .jars and .dlls to those, then makes your main project dependent on those plugins. When that didn't work, I manually added the JOGL lilbraries & .dll locations to the project properties as per the JogAmp wiki. I even added gluegen to the .classpath entry in the build properties, but to no avail. PS Here's the tutorial I followed: http://wadeawalker.wordpress.com/2010/10/24/tutorial-creating-native-binary-executables-for-multi-platform-java-apps-with-opengl-and-eclipse-rcp/ |
Administrator
|
In reply to this post by Tom Bombadil
Hi Tom,
In Eclipse, try double-clicking your .product file, then click the "Dependencies" tab at the bottom of the product editor window. Do you see the com.jogamp.jogl plugin and all five of the com.jogamp.jogl-* fragments in the "Plug-ins and Fragments" list? If some of these are missing (or if they have a red "x" by them), it could cause Eclipse not to export the JOGL plugin properly, which would cause the problem you're seeing. Also, what version of Eclipse are you using? I wrote this tutorial with Helios, so I might need to recheck it with Indigo (if that's what you're using) to make sure the behavior is exactly the same. Don't worry, I'll help you figure out any problem. This is how I do my own work, so if it's broken, I need to know |
Administrator
|
In reply to this post by gouessej
It's not widely known, but SWT will supposedly work with Java Web Start It's documented on the SWT site at http://www.eclipse.org/swt/jws/. |
Administrator
|
Thanks Wade.
Julien Gouesse | Personal blog | Website
|
This post was updated on .
In reply to this post by Wade Walker
Hi Wade - thanks for the tutorial!
I have got the com.jogamp.jogl plugin and the two fragments I did, and no red x's to be found (for 32 & 64 bit windows - I'm leaving the others for now as I don't need 'em). I am indeed using Indigo 3.70 / 3.71, but it seems odd to me that this would cause a problem. I'm guessing I've just got the wrong value somewhere... I foolishly included dashes-in-the-project-name which seemed to cause some problems with package names, maybe I'll try renaming everything to something more sensible and seeing what happens. EDIT... changed the name, still the same! |
Administrator
|
Another thing you can do is export the binary from Eclipse, then check inside your workspace directory, at the end of the .metadata/.log file, to see if there were any error messages generated during the export that didn't show up in the GUI. That might point you in the right direction. I think there may also be a log file created in the export directory somewhere at an intermediate phase of the export, so check in there too.
If the export is working correctly, then in the exported directory there should be a file called win32.win32.x86_64\bin\plugins\com.jogamp.jogl-windows-amd64_2.0.0.b365.jar (or some similar name depending on your exact platform and JOGL build number). If you look inside this JAR with 7zip or some other archive program, you should see all the native DLLs of JOGL, including gluegen-rt.dll. If this file is missing, that would probably mean there was an error during export. If a DLL is missing from inside this file, that would probably mean that in your JOGL fragment project, the "Build" tab of the MANIFEST.MF probably doesn't have the DLL files checked in the "Binary Build" list. Let me know what you find, and we can take it from there. Bear in mind that when you edit a post on the forum, it doesn't send out another email to those watching the forum, so a new post will get a quicker response |
"If a DLL is missing from inside this file, that would probably mean that in your JOGL fragment project, the "Build" tab of the MANIFEST.MF probably doesn't have the DLL files checked in the "Binary Build" list. "
This fixed it, woo hoo! Not quite sure how I managed to miss that step, but there we go. Many, many thanks for your help. |
Administrator
|
You're very welcome. Just let me know (either on this forum, or in my blog's comments) if you have any more problems. Just FYI, I'm probably going to update the tutorials this April to use OpenGL 3.0 and shaders (instead of the old-school way I do it now), in case you're looking to do more advanced OpenGL effects. |
Free forum by Nabble | Edit this page |