osx - Error loading texture from file in Java -
i wrote code load textures files. works nicely on windows machines, once sent home work on osx, keeps crashing. simple bit of code:
string path = system.getproperty("user.dir") + file.separator + "textures" + file.separator; file file = new file(path + "steel.jpg"); try { shiptexture = textureio.newtexture(file , true); } catch {glexception e) { } catch {ioexception e) { }
i following exception: exception in thread "main" java.lang.noclassdeffounderror: com/sun/gluegen/runtime/dynamiclookuphelper
at texture init stage,
caused by: java.lang.classnotfoundexception: com.sun.gluegen.runtime.dynamiclookuphelper @ at java.net.urlclassloader$1.run
why not working?
a classnotfoundexception
doesn't have code, means class isn't in classpath can because editor doesn't find -
http://www.wikihow.com/add-jars-to-project-build-paths-in-eclipse-%28java%29
or because directory structure different in windows , mac -
http://www.ibm.com/developerworks/library/j-classpath-unix/
try removing package , adding again classpath
Comments
Post a Comment