01-12-2015, 07:43 PM
Code:
run:
[java] libGL error: dlopen /usr/lib/fglrx/dri/i965_dri.so failed (/usr/lib/fglrx/dri/i965_dri.so: cannot open shared object file: No such file or directory) <- ignore that, opengl wants to use my discrete gfx card which is currently disabled
[java] Exception in thread "main" java.lang.NoClassDefFoundError: org/newdawn/slick/util/ResourceLoader
[java] at ImageAtlas.<init>(Unknown Source)
[java] at MainJump.main(Unknown Source)
[java] Caused by: java.lang.ClassNotFoundException: org.newdawn.slick.util.ResourceLoader
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[java] ... 2 more
[java] Java Result: 1
The snippet of code which uses the class ResourceLoader:
Code:
import org.newdawn.slick.util.ResourceLoader; //used here
import org.newdawn.slick.opengl.Texture;
import org.newdawn.slick.opengl.TextureLoader;
import java.io.IOException;
public class ImageAtlas{
private Texture texture;
ImageAtlas(String path){
try{
texture = TextureLoader.getTexture("PNG",
ResourceLoader.getResourceAsStream(path)); //and here
}
catch(IOException e){
System.out.println("Could not load texture");
e.printStackTrace();
}
}
}
Let me know if you need any more info.