Missing textures

Hey. I am tryign to create a skybox (and also to texture land). I'm using netbeans, and I've placed all the images I need in the project folder, so it's like C:Documents and SettingsTrussellNetBeansProjectsMapLoaderExpirement2north.jpg



I'm using this for my skybox texturing code:


        Texture north = TextureManager.loadTexture(MapLoaderTest2.class.getClassLoader().getResource("NORTH.jpg"));
        Texture south = TextureManager.loadTexture(MapLoaderTest2.class.getClassLoader().getResource("SOUTH.jpg"));
        Texture east = TextureManager.loadTexture(MapLoaderTest2.class.getClassLoader().getResource("EAST.jpg"));
        Texture west = TextureManager.loadTexture(MapLoaderTest2.class.getClassLoader().getResource("WEST.jpg"));
        Texture up = TextureManager.loadTexture(MapLoaderTest2.class.getClassLoader().getResource("UPANDDOWN.jpg"));



And I'm getting this as a result

what did I do wrong?

if you use the class loader, you need to give the path to the file also, not only the filename.



But its better to use the ResourceLocator tol to load resources.



First set up the resource locator ( you do this once, when the game gets initialized)


ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_TEXTURE,
    new SimpleResourceLocator(Main.class.getClassLoader().getResource("com/jmedemos/physics_fun/resources/")));



Then later use the Resource locator, when you need to load a resource:


ts.setTexture(TextureManager.loadTexture(
                        ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_TEXTURE,
                        "north.jpg"), Texture.MM_LINEAR, Texture.FM_LINEAR));