www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: skullfire on August 29, 2006, 11:14:23 pm

Title: Problem with applet loading resources
Post by: skullfire on August 29, 2006, 11:14:23 pm
Well, I can't get the applet to work on an html... only on the applet Viewer on NetBeans. Perhaps there's something wrong with the dir to the resources?

    public static final String Texture_LightPlayerPiece = "/data/marble.jpg";
    public static final String Texture_DarkPlayerPiece = "/data/wood.jpg";

 texMan.addTexture("LightPlayerPiece", new Texture(documentBase, Resources.Texture_LightPlayerPiece));
        texMan.addTexture("DarkPlayerPiece", new Texture(documentBase, Resources.Texture_DarkPlayerPiece));
Title: Problem with applet loading resources
Post by: Melssj5 on August 30, 2006, 01:39:36 am
What exception do you get?

Are u using a jar file? if using a jar file if so then the 3d files and textures have to be outside the jar file. Are you using software or hardware rendering???
Title: Problem with applet loading resources
Post by: EgonOlsen on August 30, 2006, 10:43:02 pm
Have you set the codebase-attribute in the applet tag? It could also be worth a try to put the resources into the same directory as the applet and then do a simple
Code: [Select]
public static final String Texture_LightPlayerPiece = "marble.jpg";
public static final String Texture_DarkPlayerPiece = "wood.jpg";

Just to see, if the directory is causing the problem somehow.