Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weird ClassNotFoundException in Java

     [java] libGL error: dlopen /usr/lib/fglrx/dri/ failed (/usr/lib/fglrx/dri/ 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] at$
     [java] at Method)
     [java] at
     [java] at java.lang.ClassLoader.loadClass(
     [java] at sun.misc.Launcher$AppClassLoader.loadClass(
     [java] at java.lang.ClassLoader.loadClass(
     [java] ... 2 more
     [java] Java Result: 1
I'm on Ubuntu 14.04 and latest java 1.7
The snippet of code which uses the class ResourceLoader:
import org.newdawn.slick.util.ResourceLoader;          //used here
import org.newdawn.slick.opengl.Texture;
import org.newdawn.slick.opengl.TextureLoader;


public class ImageAtlas{

    private Texture texture;

    ImageAtlas(String path){


            texture = TextureLoader.getTexture("PNG",
                ResourceLoader.getResourceAsStream(path)); //and here
        catch(IOException e){

            System.out.println("Could not load texture");
getResourceAsStream(String) is the only method I'm using from ResourceLoader
Let me know if you need any more info.

Messages In This Thread
Weird ClassNotFoundException in Java - by CHmSID - 01-11-2015, 07:18 PM
RE: Weird ClassNotFoundException in Java - by CHmSID - 01-12-2015, 07:43 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)