• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Retrieving URL using getResource

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Team,

In my project i need to retrieve the url to a resource(xml file ) in one java project from another project ,two project are in the same work space.

i tried the same when the resource is in the same project that is working but when the resource is in a different project its not working and the url is coming as null.

please find the piece of code i used for getting the url


 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When the resource in another project, it is not in classpath.
So try adding project dependency( assumed you are using eclipse by the usage of term workspace)

Properties --> Java build path-> projects
 
reply
    Bookmark Topic Watch Topic
  • New Topic