Advertisement

04.09.2005 at 10:07AM PDT, ID: 21382755
[x]
Attachment Details

Read from relative path.

Asked by rahulkothari in Java Programming Language

Tags: path, relative, java

Hi

I have this trivial problem ... :) beleive it is major for me ... I just want to tell that to myself ....

I have a XML file in my Java project (command line based) . The XML file is in the folder <classes>/resources/db.xml.

Now I want to read this XML file.

I have tried this.getClass().getResourcesAsStream("db.xml"); /// bombs right on my face with malformed url exception
this.getClass().getResources("db.xml").getFile(); /// i feel even worse.

Can any one hash this out for me ...

RKStart Free Trial
[+][-]04.09.2005 at 10:18AM PDT, ID: 13744266

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.09.2005 at 01:57PM PDT, ID: 13744896

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.09.2005 at 03:20PM PDT, ID: 13745203

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.10.2005 at 05:28AM PDT, ID: 13746857

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.10.2005 at 05:30AM PDT, ID: 13746866

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.10.2005 at 07:21AM PDT, ID: 13747216

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.11.2005 at 07:55AM PDT, ID: 13753448

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Tags: path, relative, java
Sign Up Now!
Solution Provided By: hint
Participating Experts: 5
Solution Grade: C
 
 
[+][-]04.19.2005 at 08:28AM PDT, ID: 13816363

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2005 at 08:38AM PDT, ID: 13816464

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.19.2005 at 08:47AM PDT, ID: 13816561

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2005 at 08:52AM PDT, ID: 13816613

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.19.2005 at 08:55AM PDT, ID: 13816645

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2005 at 08:58AM PDT, ID: 13816685

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32