I have tested this, but it continues giving this exception. The getCodeBase() works 
correctly (it has to be called from init(), paint() or another applet method but not 
from the constructor).
Has anyone been working with this ? Is there any code example ?

Many thanks !!

Dani

Hi

I ran into this problem when I first tried texture mapping in Java3D. Due to
the untrusted nature of applets, browsers will not allow them to read or
write to or from the local file system, so the "file:./test.wrl" is the
culprit
Use Applet.getCodeBase() to get the base URL.
For example

s = f.load(new URL(getCodeBase(), "test.wrl"));

Bob

>From: Daniel Moscoso <[EMAIL PROTECTED]>
>Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: [JAVA3D] AccessControlException trying to using VRML loader from
>            an applet
>Date: Fri, 25 May 2001 12:50:05 +0100
>
>Hi  all !
>
>I have tried to test the VRML loader from an applet. The way to do it is
>like the ObjLoader:
>
>
>import com.sun.j3d.loaders.vrml97.VrmlLoader;
>import com.sun.j3d.loaders.ParsingErrorException;
>import com.sun.j3d.loaders.IncorrectFormatException;
>import com.sun.j3d.loaders.Scene;
>
>...
>
>VrmlLoader f = new VrmlLoader();
>Scene s = null;
>try {
>     s = f.load(new URL("file:./test.wrl"));
>}
>catch (FileNotFoundException e) {
>     System.err.println(e);
>     System.exit(1);
>}
>catch (ParsingErrorException e) {
>     System.err.println(e);
>     System.exit(1);
>}
>catch (IncorrectFormatException e) {
>     System.err.println(e);
>     System.exit(1);
>}
>objRoot.addChild(s.getSceneGroup());
>
>...
>
>but it gives an AccessControlException, while the ObjLoader works by this
>way.
>What is the problem ? Am I doing something wrong or the VRML loader isn't
>able to work from applets ?
>
>Thanks in advanced !!
>
>Dani
>
>
>
>--
>
>Diese E-Mail enth�lt vertrauliche und/oder rechtlich gesch�tzte
>Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
>irrt�mlich erhalten haben, informieren Sie bitte sofort den Absender und
>vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
>Weitergabe dieser Mail ist nicht gestattet.
>
>This e-mail may contain confidential and/or privileged information. If you
>are not the intended recipient (or have received this e-mail in error)
>please notify the sender immediately and destroy this e-mail. Any
>unauthorised copying, disclosure or distribution of the material in this
>e-mail is strictly forbidden.
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".





--

Diese E-Mail enth�lt vertrauliche und/oder rechtlich gesch�tzte Informationen. Wenn 
Sie nicht der richtige Adressat sind oder diese E-Mail irrt�mlich erhalten haben, 
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das 
unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to