Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

accessing files in a jar-file

  Asked By: Bill    Date: May 22    Category: Java    Views: 946
  

I have included some xsl-files into a jar-file. I can access this
files with the following code-snipped if the jar-file is local on my
harddisk or if I run the Main-Class directly:

ClassLoader.getSystemClassLoader().getResource
("pcodeliste.xsl").openStream()

But the problem is that I use this jar-file as a part of a j2ee-
application (it's a ear-file). After deploying this ear-file to my
application-server (oc4j) I get a exception that the file couldn't be
found.

Can anybody help me how to change this code or how to change the j2ee-
application to have access to this files??
Do I have to make an entry into the Manifest-file??
Do I have to call the parent-classloader or something else??

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on accessing files in a jar-file Or get search suggestion and latest updates.




Tagged: