[java]Grave: Cannot create locator of type mygame.Main$FileLoader, does the class have an empty and publically accessible constructor?
sep 08, 2014 9:39:01 AM com.jme3.app.Application handleError
Grave: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:288)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:342)
at mygame.Main.simpleInitApp(Main.java:52)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:744)
It will also need to be a static inner class or it won’t work either. (or make it a separate class) Non-static inner classes cannot be instantiated like normal classes.
@fdiaz said:
The problem is to compile because the assets stored on a jar file and then you can not find the path.
This statement makes no sense to me. Either you are using a different definition of “compile” (in my definition, compile is turning .java files into .class files or some other actually compiling of source files into binaries) or you are still confused about how assets work.
All assets are in the assets.jar file. This is not a problem. I don’t know what “find the path” means in this case.
I think there is some part of your story that I’m missing. Though really I know little to nothing about nifty these days but it uses JME’s asset manager when used with JME… so…