Skip to main content

Beanshell "Could not resolve path" but broser sees the file

No replies
jimberry
Offline
Joined: 2013-01-15
Points: 0

In a Beanshell script I have the following code

<br />
import com.kitfox.svg.*;<br />
import com.kitfox.svg.app.beans.*; </p>
<p>SVGPanel examplePanel = new SVGPanel();</p>
<p>File f = new File(skinDirectory+"/includes/weave.svg");<br />
System.out.println("Existence check: " + f.exists());</p>
<p>examplePanel.setSvgResourcePath(skinDirectory+"/includes/weave.svg");<br />

which prints "Existence check: true"

but throws the error
"com.kitfox.svg.SVGException: Could not resolve path C:\Users\Jim\AppData\Roaming\JAlbum\skins\rhino_b2_1/includes/weave.svg"

Putting the rejected path into a web browser displays the file OK.

Can anyone give a possible reason for beanshell not resolving the path?