Keiron, I just commited a fix to address your issue. Now, if you specify the java.security.policy property to point to your policy file, then it will take precedence over the one used by the default packaging.
java -jar batik-all.jar -Djava.security.policy=<myPolicyFileURL> .... Note that if your policy file uses properties (as the ones in the default packaging), you'll also need to specify these properties through the command line. java -jar batik-all.jar -Djava.security.policy=<....> -Dapp.jar.base=<...> ... In case you are not familiar with the security features, you can use the security debug option to make sure the policy files are loaded properly. Do: java -Djava.security.debug=help to get a list of possible debug info. Cheers, V. > Keiron, > > Keiron Liddle wrote: > > > > Hi, > > > > Thanks for the great work you have been doing. It's looking really good. > > > > I thought I should bring a problem to your attention. I cannot use the > > the transcoder from the command line with the batik-all.jar library due > > a security enforcer problem. I guess the comment in the code says it all > > "Something is seriously wrong." :). > > Yes. batik-all.jar is meant to provide all the things you would ever > need > in Batik. You could use the rasterizer from the batik-rasterizer.jar > file > which is the expected way to use it.It is not meant as an entry point > for applications but there is an issue anyway. > > The issue your are running into here is that policy files depend on > packaging and the apps (browser and rasterizer) can work both in > development > mode (i.e., in the source distribution) or jared mode (i.e., from their > respective batik-svgbrowser.jar and batik-rasterizer.jar) but until now > in a single packaging configuration. > > Short term, if you want the applications to work in a different > packaging > mode (as from batik-all.jar), you'll have to change the bootstrap class > in > org.apache.batik.apps.rasterizer.Main (see the RASTERIZER_JAR_NAME > constant) or use batik-all.jar. > > What I propose to do to address your need is to initialize > RASTERIZER_JAR_NAME > to the value of the rasterizer.jar.name system property. It will default > to its current value (batik-rasterizer.jar). This way, if you repackage > the application, you'll be able to point to the jar file you are using > by > doing something like: > > java -Drasterizer.jar.name=batik-all.jar > -cp batik-all.jar org.apache.batik.apps.rasterizer.Main > > I'll do that next week. > Cheers, > V. > > > > > Hope this helps. > > > > expandedMainClassName: > > >file:/export/home/keiron/xml/anon/xml-batik/batik-1.5/lib/batik-all.jar!/org/apache/batik/apps/rasterizer/Main.class > > > > expected substring: > > batik-rasterizer.jar!/org/apache/batik/apps/rasterizer/Main.class > > > > Exception in thread "main" java.lang.Error > > at org.apache.batik.util.ApplicationSecurityEnforcer.setJarBase(Unknown > > Source) > > at > > org.apache.batik.util.ApplicationSecurityEnforcer.installSecurityManager(Unknown >Source) > > at > > org.apache.batik.util.ApplicationSecurityEnforcer.enforceSecurity(Unknown Source) > > at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source) > > at org.apache.batik.apps.rasterizer.Main.main(Unknown Source) > > > > --------------------------------------------------------------------- > > 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]