Problem loading ms3d textures

I'm trying to load a model with its textures. The model loads fine, but with no textures.



Here's the code:




    URL model = SimpleGameTest1.class.getResource("/resources/human-warrior.ms3d");         
         
    FormatConverter converter = new MilkToJme();
         
    converter.setProperty("texdir","resources/");
         
    ByteArrayOutputStream bo = new ByteArrayOutputStream();
      
    converter.convert(model.openStream(), bo);
    Node warrior = (Node)BinaryImporter.getInstance().load(new ByteArrayInputStream(bo.toByteArray()));
      
    warrior.setModelBound(new BoundingSphere());
    warrior.updateModelBound();

    rootNode.attachChild(warrior);



I've seen some threads about problems loading Milkshape textures and classpaths, but in my case the models and textures are under <project-folder>/src/resources which should already be in the app classpath.
Anything wrong with my code?

Thx,
Brancha.

If you are using jME 1.0, use the ResourceLocatorTool.  Here's a snip from jME's milkshape test:



        try {
            ResourceLocatorTool.addResourceLocator(
                    ResourceLocatorTool.TYPE_TEXTURE,
                    new SimpleResourceLocator(TestMilkJmeWrite.class
                            .getClassLoader().getResource(
                                    "jmetest/data/model/msascii/")));
        } catch (URISyntaxException e1) {
            logger.log(Level.WARNING, "unable to setup texture directory.", e1);
        }

Thanks Renanse,



worked perfectly !!