[Solved] Recompiling FengGUI sources under java 1.5/ .jar for 1.5?


I am just trying to use FengGUI and create a GUI for my game and I downloaded the jar file and added it to my library and when trying an example, I got the following error:

class file has wrong version 50.0, should be 49.0
Please remove or make sure it appears in the correct subdirectory of the classpath.

I checked their forums and another person had the same problem and the admin told them that the new .jar file was compiled under java 1.6 and so if their machine used java 1.5 then they would have this problem. The solution would be to upgrade to 1.6(not possible as its university) or to recompile it under 1.5. So I downloaded the sources and couldnt find instructions to do this - like jME provides with jME and jME-physics. I tried following the same method as jME physics but its giving me a host of errors. Could anyone please suggest how to do this??

Or better does anyone have the .jar file for the previous version 1.5 which I can add to my library and start using?




The most productive thing you can do as a developer is to put all the source in its own project within an IDE.

There are tutorials on the site to explain how to do this within eclipse ( my choice of IDE ) or netbeans

? Do you use an ide

This might best be answered by marc on the FengGUI forum, but I might as well give it a go.

First of all, for development purposes you do not have to compile it into a jar. It is far more convenient to download the src from the CVS and have it as a separate project in your workspace. In order to use it in your own project you would only need to add the FengGUI project to your own project’s build path. This way you can also Update the FengGUI from the CVS every now and again, and always have the most current version.

If you strongly feel that you want to make a jar already, then you should take a look at the ‘make’ folder in the FengGUI project space. Now… assuming you are running Eclipse, all you need to do is right-click on the build.xml file and select ‘Run as’ -> ‘and build…’. From the window that opens, select the build options that interest you… for example compile and ‘build FengGUI.jar’. After that, just click Run and after a few moments find the jar file in the ./deploy folder.

Now I think for this to work you will also need to have ant set up in your computer, but I think that will not be a problem, right? :slight_smile: There are instructions about setting up ant also in the jME docs. If you need something different about your jar file, just dabble around in the build.xml file a bit… I have never really read teh docs, but the xml is fairly self explanatory often :slight_smile:

Good luck

@theprism - I use netbeans and tried to create a separate project and build it like jme-Physics-2 but I could not. May be I was going the wrong way about it but created the project using source - the source zip file downloaded from sourceforge and tried to clean and build but it was missing org.lwgl and host of other things - so assume I am wrong there in some way. Could not find instructions to build it like jME and jMe-physics.

It is far more convenient to download the src from the CVS and have it as a separate project in your workspace.

@Mindgamer - I would agree with you but since I only need it to produce simple GUI and hand in my project next week it would be quicker and easier to use .jar file rather than have a separate project - but either way I dont mind, I just cant seem to. Again thanks for explaining in great detail how to set it up on eclipse but I use netbeans. I never realised eclipse was favoured choice amongst programmers and thought netbeans is better. However, thats a discussion for another day.

Have none of you guys got .jar of may be previous release - probably compiled using 1.5??

Umm, Can you install the 1.6 JDK to a flash drive, then point NetBeans to that JDK?

I attempted to compile FengGui with 1.5 last week but ran into an external dependacy issue.  Some external jar file that was not included with FengGui, can't remember the name now though…

Basixs can you remember the name of this external dependency - that explains all the errors I got, so its not the way I compiled… Moreover does no one have fenggui.jar from a previous version?? This time would be better spent learning the examples and creating the GUI…

Would it not be a good idea to make FengGUI available with jME like jME-physics??


This is the same source as on the sourceforge website


And it does not compile - you can try it yourself. As basixs said it has an external dependency.

I spoke to the support department at my university and they were kind enough to compile the whole thing under 1.5 finding all the dependencies. To run the fenggui example at this link:


Fenggui.jar and jinput.jar are needed. I would like to attach/upload them for the benefit of other Java 1.5 users but I dont know how to do that so it would be really appreciated if someone can tell me. Thank you very much with all your help.