Premise: I am building a plugin for a peer-to-peer system that intends to be a basic 3d game. I have successfully run a single player demo built with the jmonkey engine. The demo runs fine when called directly. How I am calling the demo to run is that the classloader calls a plugin.class file. This file starts a new thread and calls the SimpleApplication.run() method.
Issue: The problem occurs when a classloader is used to load the jar file and run it. The default jmonkey engine to configure graphics comes up, however when proceeding past that point the demo stops and gives a dialog box stating the following…
Title: “Error in application”
Message:
Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
IllegalStateException: No loader registered for type “fnt”
The exception trace given in the command line is this:
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.IllegalStateException: No loader registered for type “fnt”
at com.jme3.asset.ImplHandler.aquireLoader(ImplHandler.java:199)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:266)
at com.jme3.asset.DesktopAssetManager.loadFont(DesktopAssetManager.java:365)
at com.jme3.app.SimpleApplication.loadGuiFont(SimpleApplication.java:178)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:186)
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(Unknown Source)
I am wondering if the SimpleApplication class has to be the first method called when starting a jmonkey program?