FengGUI - Trouble Implementing/Compiling

Link: http://www.jmonkeyengine.com/wiki/doku.php?id=integrating_fenggui_with_jme



I am attempting to integrate JME and FengGUI together and attempting to run the most simple program just to get a demonstration of how FengGUI works, but am running into multiple errors and other things that are not allowing me to compile my project.



Currently I have a build with a buildpath including jME_2.0.jar and FengGUI.jar along with JRE System Libraries. I'm currently running eclipse and have both *.jar files pointing to Project/lib/natives for their native libraries.



I am currently attempting to run these two sets of code:

http://www.jmonkeyengine.com/wiki/doku.php?id=new_integrating_fenggui_with_jme



One main error is found in FengJMEInputHandler.java under private Key mapKeyEvent()



All the "Keyboard.getEventKey()" or other references to Keyboard are underlined and causing errors. I'm not entirely sure how to resolve this error.

Also in this file these are having problems:

fireMouseDraggedEvent

fireMouseClickEvent

fireMouseWheel



In the FengJME.java file within protected void initSystem() there are many "properties" errors wanting me to create a local variable, and many other uses of words that look like ENUMS of sorts to be used.



Any help on how I should be configuring my project so these work properly would be great! Thanks!

Are you using the current FengGUI svn version or the old jars?

It should work with the svn version.

Core-Dump said:

Are you using the current FengGUI svn version or the old jars?
It should work with the svn version.


Currently been attempting with *.jar because a *.jar would be a little easier to work with but I could attempt the SVN.

The problem is that the latest jar release is a bit old i think.



If you use the svn version, you will have another problem to face :slight_smile:

FengGUI is currently using lwjgl 1.x but jME is using lwjgl 2.x.

Which means you need to replace the lwjgl version in FenggUI and change a few things (mostly imports i think), to make it compilable again.



It would be a good idea to ask on their forum if they could upgrade the lwjgl version, now where lwgl 2 is stable.



If thats all too much work, you can try a custom lwjgl.jar which i use with jme2.:

http://code.google.com/p/jme-demos/source/browse/trunk/stardust/lib/FengGUI.jar



Together with the FengJMEInputHandler which works with that jar.

In attempts to connect to the SVN it's giving me an error saying it cannot connect, which I don't really get since I'm connected to three other SVN things. (JME ones and my groups project one)



Also how do I setup your *.jar files within native files and build paths? Current architecture reads on our project:

JRE System libraries

Referenced Libraries

a folder lib has natives inside it. Other then that I'm just a tad confused on how to get this off the ground.

If you check out jme from svn, it already comes as a eclipse project, so you don’t have to do much really.

See this video tutorial to set up jme.

Once jme is set up, you create a new java project and add the existing jme project as ‘required project’.

Thats all.



If you need FengGUI you just add the FengGUI.jar to your new project.

Ok I got it compiling but get a massive error when attempting to run the HelloFengGui.java from FengGui's wiki.

http://fenggui.org/doku.php?id=tut:gettingstarted



The error reads:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
   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 javax.media.opengl.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:520)
   at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:131)
   at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:90)
   at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:83)
   at tutorial.HelloFengGui.<init>(HelloFengGui.java:32)
   at tutorial.HelloFengGui.main(HelloFengGui.java:133)



It is saying no jogl.jar or whatever and I have one contained in lib so not entirely sure what is going on there :/

Below is the code lines of HelloFengGui that are called (Lines 32, and 133)


//Line 133
canvas = new GLCanvas();


//Line 32
public static void main(String[] args) {
       new HelloFengGui();
   }


Its not the java jogl lirary its complaining about, its the “native” jogl.



http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_eclipse_to_build_jme_2



and look at - Resolving the Build Path Issues

JOC said:

Its not the java jogl lirary its complaining about, its the "native" jogl.

http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_eclipse_to_build_jme_2

and look at - Resolving the Build Path Issues


Meh I took my groups project and then my own, rebuilt my own following all those details and still get the same error. I'll just work with another GUI interface. Thanks for the help.

i think thats no bad idea :slight_smile:



Its a bit tricky to get FengGUI rendering correctly in jME anyway, there is also GBUI if you didnt see that already.