xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: AW: Starting squiggle programmatically fails
Date Thu, 02 Jun 2005 10:16:18 GMT
Hi Thomas,

thomas mauch wrote:
> Sorry, I don't get it. I suppose with resources you mean the org.apache.batik.apps.svgbrowser.resources

> part which is included in batik-squiggle.jar and which should therefore be reachable
as well.

    It wasn't clear to me that you were using the Jar files directly.

> To make sure that no hidden JAR-specialities are going on, I ran the browser as well
like that.
> 
>   java -cp d:\java\batik-1.6.\batik-squiggle.jar org.apache.batik.apps.svgbrowser.Main
> 
> and it worked. When I however run
> 
>   java -cp d:\java\batik-1.6.\batik-squiggle.jar;. SVGBrowser
> 
> where SVGBrowser is the class with my tiny programm, I get the error mentioned. 

    Well now I am suspecting that there is something strange with your
security settings.  Are you using a weird site policy for your Java?
This might explain the security exception when Batik tries to set
the proxy authenticator, and if set restrictively enough it might
prevent Batik from finding the images for the 'loading' window.
But I'm starting to grasp at straws.

    If you built a debug version of the jars it might help narrow
where the problem is happening.

> And then you suggested using the JSVSViewerFrame instead - do you know an example? 

    The only real example is the Main class you are currently
referencing.  However for a programmatic linkage you would probably
want to remove a bunch of stuff.

> But I suspect that I would encounter the same problems as now.

    Seems likely.

> 
> -----Urspr√ľngliche Nachricht-----
> Von: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com] 
> Gesendet: Mittwoch, 1. Juni 2005 19:15
> An: batik-users@xmlgraphics.apache.org
> Betreff: Re: Starting squiggle programmatically fails
> 
> Hi Thomas,
> 
> thomas mauch wrote:
> 
>>I would like to start squiggle programmatically from within a java 
>>programm to display a SVG file, but it always crashes.
>>I now have this tiny test program
> 
> 
>     It looks to me like you are missing the contents of the 'resources' directories on
your class path.
> 
>     Also I should mention that Main probably isn't the best place to programatically
link into the browser.  I would suggest using the JSVGViewerFrame providing an implementation
of the 'Application' interface.
> 
> 
>>import org.apache.batik.apps.svgbrowser.*;
>>
>>public static void main(String[] args) throws Exception {
>>	new Main(new String[]{"d:\\data\\test.svg"}); }
>>
>>which raises the following exceptions:
>>
>>java.security.AccessControlException: access denied 
>>(java.net.NetPermission setDefaultAuthenticator) at 
>>java.security.AccessControlContext.checkPermission(AccessControlContext.
>>java:264)
>>at
>>java.security.AccessController.checkPermission(AccessController.java:4
>>27
>>)
>>at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
>>at java.net.Authenticator.setDefault(Authenticator.java:110)
>>at org.apache.batik.apps.svgbrowser.Main.<init>(Unknown Source) at 
>>FP2SVGConverter.main(FP2SVGConverter.java:9)
>>Exception in thread "main" java.lang.NullPointerException at 
>>javax.swing.ImageIcon.<init>(ImageIcon.java:138)
>>at org.apache.batik.apps.svgbrowser.AboutDialog.buildGUI(Unknown 
>>Source) at org.apache.batik.apps.svgbrowser.AboutDialog.<init>(Unknown 
>>Source) at org.apache.batik.apps.svgbrowser.Main.<init>(Unknown 
>>Source) at FP2SVGConverter.main(FP2SVGConverter.java:9)
>>
>>When I try "java -jar batik-squiggle.jar d:\data\test.svg" everythings 
>>works fine.
>>
>>What am I missing?
>>Thanks in advance
>>Thomas
>>
>>____________________________________________________________
>>This message may contain legally privileged or confidential 
>>information and is therefore addressed to the named persons only.
>>The recipient should inform the sender and delete this message, if 
>>he/she is not named as addressee.
>>The sender disclaims any and all liability for the integrity and 
>>punctuality of this message.
>>The sender has activated an automatic virus scanning by Messagelabs, 
>>but does not guarantee the virus free transmission of this message.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>>For additional commands, e-mail: 
>>batik-users-help@xmlgraphics.apache.org
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 
> 
> ____________________________________________________________
> This message has been checked for all known viruses by Messagelabs.
> 
> ____________________________________________________________
> This message may contain legally privileged or confidential 
> information and is therefore addressed to the named persons only. 
> The recipient should inform the sender and delete this message, 
> if he/she is not named as addressee. 
> The sender disclaims any and all liability for the integrity 
> and punctuality of this message. 
> The sender has activated an automatic virus scanning by 
> Messagelabs, but does not guarantee the virus free 
> transmission of this message.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message