[jdom-interest] debug everywhere
Jason Hunter
jhunter at servlets.com
Fri Jan 19 14:59:50 PST 2007
When you pass a string to the build() command you are passing a
systemId, not a path to file. Internally it's converted to a SAX
InputSource. Odds are it's a backslash related issue in that you were
lucky sometimes your file path worked as a systemId, but on Windows it
doesn't because of C: and backslashes.
-jh-
dmatthews at inbox.lv wrote:
> Hi jdom
>
> import org.jdom.Document;
> SAXBuilder builder = new SAXBuilder();
> try{
> Document doc = builder.build("path to file");
> } catch(Exception e){}
>
> on Gnu\Linux with java 1.5 or 1.6 - good
> on Windows with java 1.5 - good
> on Windows with java 1.6 - NullPointerException
>
> this works in all above cases:-
>
> File file = new File("path to file");
> try{
> Document doc = builder.build(file);
> } catch(Exception e){}
>
>
>
> hope this is of interest
> thanks for jdom
>
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
>
More information about the jdom-interest
mailing list