aspose file tools*
The moose likes Java in General and the fly likes Reading a EAR file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Reading a EAR file" Watch "Reading a EAR file" New topic
Author

Reading a EAR file

Atul Prabhu
Ranch Hand

Joined: Dec 17, 2002
Posts: 60
Hi,

need to know whether a particluar class ex: Person is present in the ear file or not ?

Actually Person class is present in a jar file within the ear file.

I tried to use java.util.jar package which has a class called JarFile which gives me the list
like this
META-INF/
META-INF/MANIFEST.MF
lib/
lib/cglib-2.0-rc2.jar
META-INF/application.xml
META-INF/sun-j2ee-ri.xml
abc.jar

Actually the Person class is present in abc.jar. The problem is how do I come to know whether Person class exists in abc.jar..

Any suggestions ??( I have to do this programatically not through command prompt)

Regards
Atul
Chapoor Chapoor
Greenhorn

Joined: Jan 11, 2005
Posts: 1
Did you solve it ?
I ve the same problem...
Read this...


How can I read the Manifest properties from my code ?

MyEAR.ear
- META-INF/Manifest.mf
- MyJAR.jar <-- code here need to read the manifest above.?

How can I achive this?
The code in MyJAR needs to read the Manifest in the EAR file. How?

Its no problem readig the manifest in the JAR but cant figure out the EAR.

Thanks.
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
What are you trying to accomplish?

I mean why do you need to programmatically determine whether a class is within a jar in an ear?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading a EAR file