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.
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)
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)
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)
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.
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 :))
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.