For savtey issue you cannot load/save files from an applet
You should have two "java.policy" files on your HD. Here You should give
additional permission rights
Example File location:
c:\java\jre\lib\security\java.policy
c:\programs\java\jre1.4.1\lib\security\java.policy
adding this line will work, but is very insecure:
permission java.util.PropertyPermission "<ALL_FILES>", "read";
for a complet documentation: search the web.
----- Original Message -----
From: "Cassia Trojahn dos Santos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 31, 2003 11:07 AM
Subject: [JAVA3D] VrmlLoader and applet!
> Hello,
>
> I'm trying load a vrml file in an applet, with VrmlLoader. But, I got the
following
> exception:
> exception: java.security.AccessControlException: access denied
> (java.lang.RuntimePermission createClassLoader)
> Do you had this problem before? How to handle it?
> Following my fragment code:
> protected URL getURL(String filename)
> {
> URL codeBase = getCodeBase();
> URL url = null;
> try
> { url = new URL(codeBase, filename); }
> catch (java.net.MalformedURLException e)
> { System.err.println("Erro");
> return null;
> }
> return url;
> }
> ............
> arquivoAmbiente = getURL("ambiente.wrl");
> .............
> VrmlLoader loader = new VrmlLoader();
> bg.setCapability(Group.ALLOW_CHILDREN_EXTEND);
> addKbdNavig(universe,bg);
> try
> { s = loader.load(arquivo); }
> catch (FileNotFoundException e) { }
> catch (ParsingErrorException e) { }
> catch (IncorrectFormatException e) { }
> ...........
> Please, help-me!
> Thanks a lot.
>
>
===========================================================================
> 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".
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 24.04.2003
===========================================================================
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".