Hi,

Im trying to write a little app that uses the rasterizer to convert an
SVG to a PNG. Obviously this is exactly what batik-rasterizer.jar
does, however I want to be able to write a servlet and import
org.apache.batik.apps.rasterizer.*, and then be able to rasterize the
file on the fly.

So basically Im starting by just making a console class for testing,
and then I'll move onto the servlet. Here is what I've got so far:

import org.apache.batik.apps.rasterizer.*;

public class TestSVGGeneration{

  public static void main(String args[]){

    String[] args1 = new String[] {"c:\temp\test.svg"};
    (new org.apache.batik.apps.rasterizer.Main(args1)).execute();

  }

}

Obviously what Im trying to do there is just to pass
org.apache.batik.apps.rasterizer.Main the array of files I want it to
process, and then for it to go ahead and do what it would normally do
it I had used the dos command:
java -jar batik-rasterizer.jar c:\temp\test\test.svg

But I get the following stack trace:
Exception in thread "main" java.security.AccessControlException: access denied (
java.util.PropertyPermission java.security.policy write)
        at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:269)
        at java.security.AccessController.checkPermission(AccessController.java:
401)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
        at java.lang.System.setProperty(System.java:654)
        at org.apache.batik.util.ApplicationSecurityEnforcer.installSecurityMana
ger(Unknown Source)
        at org.apache.batik.util.ApplicationSecurityEnforcer.enforceSecurity(Unk
nown Source)
        at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source)
        at TestSVGGeneration.main(TestSVGGeneration.java:9)

Im not exactly sure what its getting an 'access denied' from. Can
anyone tell me what I am doing wron please?

java version "1.4.2_04"

Thanks!

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

Reply via email to