Models in applets problem

I've successfully loaded models as part of an application.

I'm currently trying to do the same inside an applet.  I'm well inside applet memory bounds.

The following exception is being thrown:

Exception in thread "AWT-EventQueue-2" java.lang.NoSuchMethodError: com.jme.util.TextureKey.<init>(Ljava/net/URL;ZI)V

at com.jmex.model.converters.ObjToJme.processLine(Unknown Source)

at com.jmex.model.converters.ObjToJme.processMaterialFile(Unknown Source)

… more stuff below.

Looking at the converter, there's only one call to a constructor in TextureKey.

TextureKey has a constructor with that format.

Any clues on what I'm missing?

Also, I don't know how to read "(Ljava/net/URL;ZI)V" so if that's it, explanation would be great :slight_smile:

Thanks for suggestions on how to solve.

Is your applet signed??

Sandbox security can often lead to run-time errors like this.

The applet (and all the jars) are self-signed (ie, I didn't use a signing authority).

Before doing all that maybe take a look at the ResourceLocator tool :wink:

Putting a new jme.jar on the server solved the immediate problem.

However, instead of trying to load texture images from:


the application is now trying to load them from:


The texture images are in the same location as the .obj file.

.md5 seems to work fine however. 

Posted to assist others, I'll work around by switching everything to md5.


Thanks for the suggestion!

Playing around with this, ModelResourceLocator crashes the browser for me.

(Java 1.5, Firefox).

Digging around I learned that the solution to the problem is even simpler:

Setting the texdir property solves the problem :slight_smile:

FormatConverter converter = new ObjToJme();

converter.setProperty("texdir", baseURL);

              // now load as usual.