This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Reading a EAR file" Watch "Reading a EAR file" New topic

Reading a EAR file

Atul Prabhu
Ranch Hand

Joined: Dec 17, 2002
Posts: 60

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

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)

Chapoor Chapoor

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 ?

- 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.

Carol Enderlin
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?
Consider Paul's rocket mass heater.
subject: Reading a EAR file
It's not a secret anymore!