Small Java exception that I can't understand -
can me resolve this?
exception in thread "main" com.jme3.asset.assetnotfoundexception: interface/splash.png @ com.jme3.system.jmedesktopsystem.showsettingsdialog(jmedesktopsystem.java:112) @ com.jme3.system.jmesystem.showsettingsdialog(jmesystem.java:128) @ com.jme3.app.simpleapplication.start(simpleapplication.java:125) @ adventure.q3world.main(q3world.java:85)
it used work, had repackage , might've forgotten setting or likewise in eclipse. splash file there not on path.
what i'm trying to this, works in previous build:
settings.setsettingsdialogimage("interface/splash.png");
i've tried adding path resource panel no other effect:
and in java build path, resource listed it's still not working:
the larger code block want work , working in built jar not within eclipse juno is:
public static void main(string[] args) { file file = new file("quake3level.zip"); if (!file.exists()) { usehttp = true; } q3world app = new q3world(); appsettings settings = new appsettings(true); settings.settitle("dungeon world"); settings.setsettingsdialogimage("interface/splash.png"); app.setsettings(settings); app.start(); }
success
can tell how run code (e.g. command line, if so, classpath), , locations of splash.png in folder structure?
the file needs on classpath, appears code loads image.
string iconpath = sourcesettings.getsettingsdialogimage(); if(iconpath == null){ iconpath = ""; } final url iconurl = jmesystem.class.getresource(iconpath.startswith("/") ? iconpath : "/" + iconpath); if (iconurl == null) { // *****line 112 below***** throw new assetnotfoundexception(sourcesettings.getsettingsdialogimage()); }
Comments
Post a Comment