JDK (3.1) instant crash (Archlinux, OpenJDK)

Hello!

I am new here and wanted to try out the jMonkeyEngine to replace my own implementation, but sadly the (new) sdk won’t work.

I get an instant crash after all the modules have been loaded:

(And I can’t even add a link, because the gist would add another link -.-)

link: gist.github.com/anonymous/de0ad0e91ddb8a54120c

Any ideas on what could be the cause and how to solve this? (version 1.8.0_51-b16 looks wrong)

You could try using a system installed JDK by commenting out the jdk line in the jmoneyplaform.conf file (see SDk troubleshooting page)

Thanks, fixed it :slight_smile:

Ah, well… this version of netbeans seems to have a weird error with Scala… sighs

So no SDK then. And in IntelliJ I can’t get this to run so far -.-
Well, well… not going back to coding in Java :wink:

you can use the SDK only for the Assets manipulation, and IDE of your choice to code with jvm language of your choice (Java, Scala, Kotlin, Celan, Xtend, Clojure,…). You’ll not have all the in code helper provided by the SDK (eg completion to write Asset path, ability to use your custom AppState in SceneViewer,…).

True, I could, if it was working. But currently IntelliJ and jMonkey don’t love each other on my side, meaning I get strange exceptions, although the class-path is set.

On non-SDK IDE, you have to recreate the project from empty. In my case I setup a gradle project, use the maven repository or jitpack.io to list jme dependenies, and add the assets directory as a resource directory + some filter.

TBN, I use SDK not very often.

1 Like

Thank you for your efforts. I used SBT and managed libs first, then I switched to unmanaged and added all .jars to the default unmanaged libs-directory libs

I set the resource-dir accordingly, but I get an exception even for an “empty” application (where nothing happens):

public class HelloJME3 extends SimpleApplication {

public static void main(String[] args){
    HelloJME3 app = new HelloJME3();
    app.start(); // start the game
}

@Override
public void simpleInitApp()
{
    /*
    Box b = new Box(1, 1, 1); // create cube shape
    Geometry geom = new Geometry("Box", b);  // create cube geometry from the shape
    Material mat = new Material(assetManager,
            "Common/MatDefs/Misc/Unshaded.j3md");  // create a simple material
    mat.setColor("Color", ColorRGBA.Blue);   // set color of material to blue
    geom.setMaterial(mat);                   // set the cube's material
    rootNode.attachChild(geom);              // make the cube appear in the scene
*/
}

}

As you can see, nothing happens. Dependencies are known (so all imports work)

but upon compilation:

Exception in thread “AWT-EventQueue-0” java.lang.NoSuchMethodError: com.jme3.system.AppSettings.getGammaCorrection()Z
at com.jme3.app.SettingsDialog.createUI(SettingsDialog.java:361)
at com.jme3.app.SettingsDialog.(SettingsDialog.java:217)
at com.jme3.system.JmeDesktopSystem$3.run(JmeDesktopSystem.java:131)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Not sure what causes that yet.

This implies that there are somehow two different versions of JME being loaded.

Well, thank you. I downloaded the .zip from the website, extracted it and manually put all the jars in there to the libs folder (which, as said, is the default for unmanaged libs in sbt)

not sure what I could do differently.

Can you share the content of build.sbt and the list of your libs folder (with unmanaged libs).
Like @pspeed said, you seems to use jar made for jme 3.1 with jme 3.0 (Gamma support is part of 3.1)

1 Like

Sure thing… although the .sbt is probably completely uninteresting (as said, I manage the lib manually now ;))

But just to make sure:

name := “JMonkey-Evaluation”

version := “Pre-Alpha”

scalaVersion := “2.11.7”

scalacOptions := Seq(“utf8”)

scalaSource in Compile := baseDirectory.value / “src/main”

javaSource in Compile := baseDirectory.value / “src/main”

scalaSource in Test := baseDirectory.value / “src/test”

javaSource in Test := baseDirectory.value / “src/test”

resourceDirectory in Compile := baseDirectory.value / “res/main”

resourceDirectory in Test := baseDirectory.value / “res/test”

sourceDirectories in Compile <<= (sourceDirectories in Compile) { dirs =>
dirs.filterNot(_.absolutePath.endsWith(“-2.11”))
}

sourceDirectories in Test <<= (sourceDirectories in Test) { dirs =>
dirs.filterNot(_.absolutePath.endsWith(“-2.11”))
}

in lib (sorry, lib is the standard in sbt… I always mix that up, but it’s called lib and it finds the dependencies), there is:

arboreal-assets.jar
assets.jar
eventbus.jar
gluegen-rt.jar
groovy-all-2.1.9.jar
guava-12.0.jar
iso-surface-assets.jar
IsoSurfaceLib.jar
j-ogg-oggd.jar
j-ogg-vorbisd.jar
jbullet.jar
jglfont-core.jar
jinput.jar
jinput-platform-natives-linux.jar
jinput-platform-natives-osx.jar
jinput-platform-natives-windows.jar
jME3-blender.jar
jME3-core.jar
jme3-core.jar
jME3-desktop.jar
jme3-desktop.jar
jME3-effects.jar
jme3-effects.jar
jME3-jbullet.jar
jME3-jogg.jar
jME3-lwjgl.jar
jme3-lwjgl.jar
jME3-lwjgl-natives.jar
jME3-networking.jar
jME3-niftygui.jar
jME3-openal-soft-natives-android.jar
jME3-plugins.jar
jme3-plugins.jar
jME3-terrain.jar
jME3-testdata.jar
jutils.jar
Lemur.jar
LemurProps.jar
log4j-1.2.12.jar
lwjgl.jar
lwjgl-platform-natives-linux.jar
lwjgl-platform-natives-osx.jar
lwjgl-platform-natives-windows.jar
Pager.jar
SimArboreal.jar
SimFX.jar
simfx-assets.jar
slf4j-api-1.7.5.jar
slf4j-log4j12-1.7.5.jar

All from the latest .zip from december something 2014.

Notice how you have two different versions of some jars? That can’t be good.

I noticed that and already wondered why there are two jars in the .zip. But then I thought… well, uppercase != lowercase, so probably something legacy that’s needed.

Going to wager pretty strongly that one set is the 3.1 jars and the other is the 3.0 jars.

Possible. Still I only downloaded one .zip.

The last one from june 2014 (not december, sorry… american date system makes no sense at all :p)

http://updates.jmonkeyengine.org/stable/3.0/engine/

I’ll redownload and try again.

I would’ve used 3.1 nightly, but they are all from 2014 as well…

http://updates.jmonkeyengine.org/nightly/3.1/engine/

edit redownloaded… no lowercase jME-stuff in there… seems about right.

I’d still like to use the bleeding edge nightly, but can’t find it.

Are you using the 3.1 alpha SDK?

Else, I cannot possibly see how you could have 3.1 jars at all… but you clearly do since gamma support didn’t exist prior to 3.1.

1 Like

See my edit above.

I have no idea. I’m developing software for quite a time now, but I must have fucked up yesterday. I can only remember downloading the sdk and upon figuring that that version of netbeans is horrendous and not compatible with scala (as a issue in github tells) I downloaded the lib alone and created a new project…

but maybe before, as I used managed-libs, I copied something over or so…

Whatever. I’d still like to use 3.1 for my evaluation.

(But ya, 3.0 compiles now… have to try Scala tho :))

Yay Scala runs as well :slight_smile:

So, is there any actual nightly (like compiled every night) for 3.1?

Also: One problem stays… although I have an assets-folder (sibling to src) my assets are not found, so

AssetNotFoundException

is thrown sighs

Not sure why, followed the naming-conventions :confused:

If you aren’t using the SDK then you will have to handle the assets directory yourself. The SDK automatically bundles it into an assets.jar on the classpath.