This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML FilePath in Unix

 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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 ?
 
Paul Clapham
Sheriff
Posts: 21149
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like an absolute Unix path to me. What's the problem?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic