aspose file tools*
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 Java 8 in Action this week in the Java 8 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: 18150

That looks like an absolute Unix path to me. What's the problem?
I agree. Here's the link:
subject: XML FilePath in Unix
Similar Threads
package,classpath and servlet
How to Add portlet in liferay with Eclipse setup
Connecting to Unix via Windows
how to exit emacs mode
Classpath Issue - but JAR file is in the classpath