Christophe,

For Java Web Start to be able to run scripts (using 1.5b4b), jars have to be signed and special permissions requested in the .jnlp file which describes the Java Web Start application.

For applets, you'll have to do something similar. You can get information about how to do this, for example:

http://www.javaworld.com/javaworld/jw-12-2000/jw-1215-security_p.html

I hope this helps,
Regards,
Vincent.

Christophe Halna wrote:
Hello Vincent,

you're absolutely right (trace follows)!

does it mean I have to modify a java.policy or security file on the client ?
if so, how ? (just for testing)

But I can't imagine modify the default policy on "clients" machines.
is there any other way ?
There must be, bacause I'm able to use the batik "demoApplet", and view svg
files containing <script>
This demo applet uses the "java web start" but I believe the security
constraints should be the same as for a "simple applet".

regards,
Christophe.

trace is :
java.security.AccessControlException: access denied
(java.lang.RuntimePermission createClassLoader)
        at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
:267)
        at
java.security.AccessController.checkPermission(AccessController.java:394)
        at
java.lang.SecurityManager.checkPermission(SecurityManager.java:540)
        at
java.lang.SecurityManager.checkCreateClassLoader(SecurityManager.java:605)
        at java.lang.ClassLoader.<init>(ClassLoader.java:231)
        at java.security.SecureClassLoader.<init>(SecureClassLoader.java:74)
        at java.net.URLClassLoader.<init>(URLClassLoader.java:108)
        at org.apache.batik.script.rhino.RhinoClassLoader.<init>(Unknown
Source)
        at org.apache.batik.script.rhino.RhinoInterpreter.<init>(Unknown
Source)
        at
org.apache.batik.script.rhino.RhinoInterpreterFactory.createInterpreter(Unkn
own Source)
        at org.apache.batik.script.InterpreterPool.createInterpreter(Unknown
Source)
        at org.apache.batik.bridge.BridgeContext.getInterpreter(Unknown
Source)
        at
org.apache.batik.bridge.BaseScriptingEnvironment.loadScripts(Unknown Source)
        at
org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(Unknown Source)
        at org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(Unknown
Source)


-----Message d'origine-----
De : Vincent Hardy [mailto:vincent.hardy@;sun.com]
Envoye : jeudi 24 octobre 2002 10:48
A : Batik Users
Objet : Re: script - unknown language text/ecmascript


Hello Christophe,

Did you try to run your applet with applet viewer and see what trace you
get. I suspect you are running into security exceptions when running
under the applet's security manager.

Regards,
Vincent.

Christophe Halna wrote:

Hello Thomas,

I would agree if it was an application, but i'm supposed to run an applet,
so I may even not have a classpath

I added the classpath, just for testing... same result : unknown language
text/ecmascript

and the <scripts> works fine when I view the .svg file in an application.

js.jar is just listed in the "archive" attribute of the <applet>
should I specify other parameters for the applet ?

Thank you for trying to help.


-----Message d'origine-----
De : Thomas E Deweese [mailto:thomas.deweese@;kodak.com]
Envoye : mercredi 23 octobre 2002 19:08
A : Batik Users
Objet : RE: script - unknown language text/ecmascript




"CH" == Christophe Halna <[EMAIL PROTECTED]> writes:

CH> Hello, Im trying to view an .svg file containing script with an
CH> applet using JSVGCanvas

CH> the <script> in the svg file causes the error :

CH> java.lang.Exception: Unknown language: text/ecmascript at
CH> org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoadEvent
CH> (Unknown Source)....

   You are problable not including xml-batik/lib/js.jar in your class
path.  This is the EcmaScript/JavaScript engine.

CH> Here are the files (very simple), if someone can have a look and
CH> tell me what is wrong or what I should try, I would apreciate.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to