wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes XML FilePath in Unix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML FilePath in Unix" Watch "XML FilePath in Unix" New topic

XML FilePath in Unix

Andy Smith
Ranch Hand

Joined: Sep 28, 2003
Posts: 239
I am using this code and trying to run on unix environment.

DocumentBuilderFactory lDocBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder lDocBuilder = lDocBuilderFactory.newDocumentBuilder();
Document lDoc = lDocBuilder.parse(new File(/cram/ext/cramprop.xml));

It throws exception...

File 'file:///cram/ext/cramprop.xml' doesn't found....

I want to have absolute path... any solution how I can do that ?

Share Knowledge to gain it.
SCJP 2, SCWCD 2, SCDJWS, IBM 141 (In Progress), IBM 486 (Next)
Paul Clapham

Joined: Oct 14, 2005
Posts: 18712

That looks like an absolute Unix path to me. What's the problem?
I agree. Here's the link: http://aspose.com/file-tools
subject: XML FilePath in Unix