Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

accessing files in a jar-file

  Asked By: Everett    Date: Dec 19    Category: Java    Views: 1243
  

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: 

 

3 Answers Found

 
Answer #1    Answered By: Vid Fischer     Answered On: Dec 19

Which version of OC4J?????????????????????

 
Answer #2    Answered By: Daniel Costa     Answered On: Dec 19

I'm using oc4j  version 9.0.3.0.0

 
Answer #3    Answered By: Grace Ellis     Answered On: Dec 19

Please refer the following document:

otn.oracle.com/.../ClassLoadingInOC4J_WP.pdf

 
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: