Missing texture in webstart

hi there :slight_smile:

i made this webstart:

http://keisangi.free.fr/dungeon/dungeon.jnlp



source code is there: http://code.google.com/p/spaceweasel/source/browse/trunk/druaga3/src/HelloModelLoading.java

it works, but all i see is the default “missing texture” pink texture.

the obj and the mtl and the texture file are all in the same directory.



it works localy (texture displayed fine)

but the webstart version can’t seem to find the texture file.

i verified the texture file is present inside the jar (everything is there, sources, obj , mtl, texture file and all)



any idea what’s going on ? what am i missing there ?  (don’t say “textures” :wink:



tnx


nm, i got it working. :slight_smile:



*update: i added explanations so maybe it could help someone else



the problem was i properly set didn't set the directory for the object material and texture.



at first i was using this code: (which was not sufficient)


   protected void simpleInitGame() {   
.....

      URL model=HelloModelLoading.class.getClassLoader().getResource("data/test01.obj");
      FormatConverter converter=new ObjToJme();
      converter.setProperty("mtllib",model);
.....
}



and now i added theses modifications and it works:


   protected void simpleInitGame() {   
....
      URL folder= HelloModelLoading.class.getClassLoader().getResource("data/");
      URL model = HelloModelLoading.class.getClassLoader().getResource("data/test01.obj");
      FormatConverter converter=new ObjToJme();
      converter.setProperty("mtllib", folder);
      converter.setProperty("texdir", folder);
....
}



So now both local and webstart version have texture.