Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing the modules listed in application.xml  RSS feed

 
John Smith
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have several modules in my EAR file.

I'm wondering how I can get access to the modules specified in my application.xml descriptor.

I have for example,

[code]
<module>
<ejb id="persistence.jar">persistence.jar</ejb>
</module>
[code]

How can I access that jar as a resource in a standard way? Is it on the classpath of any ClassLoader that I can access?
 
John Smith
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This gets the URL:

URL myURL = Thread.currentThread().getContextClassLoader().getResource("persistence.jar");
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!