• Post Reply Bookmark Topic Watch Topic
  • New Topic

Loading an XML file in a classpath  RSS feed

 
Vrinda Werdel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a requirement where I have a an XML config file. the path of this config file is specified in the classpath. I need to load this config file at run time by just specifying the name of the file.

Eg. Assume the file abc.xml is in c:/temp/abc.xml. and my classpath is set c:/temp;


and I want to do something like this.

File file = new File("abc.xml");

Does the JRE furnish the complete the path of the file at run time?

Is something like this possible?

regards
Vrinda
 
Ajay Singh
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use this to get the URL of the file:

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!