"Missing Texture"

I started with the source code for simpleBoneAnimation.  I made a model in code and am trying to apply a texture but the texture comes out "Missing Texture".  The original simpleBoneAnimation was pointing to an image that didn't exist.


    protected void simpleInitGame() {

        Node modelNode = new Node("model");
        HandModel rightHand = new HandModel("rightHand", new Vector3f(0, 0, 0), 2f, 2f, 0.5f);
        rightHand.setModelBound(new BoundingBox());
        rightHand.updateModelBound();
        mySkin = new SkinNode("test skin");
        mySkin.setSkin( rightHand );
        modelNode.attachChild(mySkin);

        TextureState ts = display.getRenderer().createTextureState();
        ts.setTexture(TextureManager.loadTexture(jmeSandbox.class
                .getClassLoader().getResource(
//                        "test/data/model/Player/trex-eye.tga"),
                "E:\slacks_rgb.tga"),
                Texture.MM_LINEAR_LINEAR, Texture.FM_LINEAR, 0.0f, true));
        rightHand.setRenderState(ts);

        MaterialState ms = display.getRenderer().createMaterialState();
        ms.setSpecular(new ColorRGBA(0.9f, 0.9f, 0.9f, 1));
        ms.setShininess(10);
        rightHand.setRenderState(ms);

/* ... */



anyone see what is wrong with this?  I know that Eslacks_rgb.tga exists.

The problem is, that your way to load Resources

jmeSandbox.class
                .getClassLoader().getResource()


refers to your Workspace-Base-Directory
which is then "E:MyWorkspaceMyJmeProjectbin".

If you copy the "slacks_rgb.tga" to the location within you projectDirectory "test/data/model/Player/slacks_rgb.tga" your way should be working.
Just uncomment the line, and enter the correct image name.

But I suggest you take a look into the wiki and how to use the ResourceLocatorTool.