[SOLVED] Issues in trying to use Lemur GUI

I am using the JMonkey Engine for the first time yesterday. And trying to use LemurGUI. I am trying to run the code given here:

When trying to run the project, I get this errors:

EVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NoClassDefFoundError: com/google/common/io/Resources
	at com.simsilica.lemur.GuiGlobals.logBuildInfo(GuiGlobals.java:223)
	at com.simsilica.lemur.GuiGlobals.setInstance(GuiGlobals.java:131)
	at com.simsilica.lemur.GuiGlobals.initialize(GuiGlobals.java:125)
	at jme3test.helloworld.HelloJME3.simpleInitApp(HelloJME3.java:28)
	at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
	at java.lang.Thread.run(Thread.java:748)

Any tips on how to solve this?

There seems to be somethings(classes) are used by lemur at this directory &
missing from your dependencies

If you are not using Gradle , check those jars :

Here’s how I uploaded the above dependencies in the libraries folder.

Is there an another way I am supposed to do? I could only find jar files for slf4j and groovy. JME already exists when I made a JME project

Have you done ?

GuiGlobals.initalize(this); 

In your code

Add groovy-all.jar in your jar dependencies

Yes I did that

There is no groovy-all. There is groovy3.0.7 now. Added

The problem still persists.

Am I adding stuff correctly?

This is because guava is not in your classpath.

“guava-master.zip” is probably not a jar file. Probably you just downloaded the code of the project instead of an actual guava jar.

Edit: note that if you are going to use legacy build tools like ANT then for maven dependencies like guava then you have to go to maven central and track down the jars yourself in some cases (like for guava). Modern build tools like gradle or maven will do this automatically.

1 Like

as of now, I am using no build tools in the IDE. I am just downloading the JAR file and importing it to my library. Would be great to know how to use them though. Might make mu work easy

But yes, will go to maven central to track the JAR file.

By default the JME SDK will use ANT. It’s a very popular build too from 20 years ago.

You can also use gradle, I think. I don’t use the SDK so I don’t know how to set that up.

Ok I found the JAR files for guava and imported the files. Now that error has solved. But encountering an another error:

SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.RuntimeException: Groovy scripting engine not available.

Sorry I have not noticed that you are using github guava-master branch code , I have looked into my game that is built without Gradle & found that I am using guava26jre.jar , it’s not easy to find a guava jar file so this is the link🙂

https://repo1.maven.org/maven2/com/google/guava/guava/26.0-jre/guava-26.0-jre.jar

If you want to use the built in styling support then you need groovy-all.jar

The one I downloaded doesn’t seem to have that JAR file.

https://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/2.4.7/groovy-all-2.4.7.jar

Groovy all

Thanks its working now!!!

2 Likes

Just solved my own issues running Lemur. Thanks for this.

Question: Should newer versions of Groovy work as well?

They might. I haven’t tried them yet.

1 Like