File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to find Implementation Version for various packages? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How to find Implementation Version for various packages?" Watch "How to find Implementation Version for various packages?" New topic
Author

How to find Implementation Version for various packages?

Ravi Pydi
Greenhorn

Joined: Sep 01, 2002
Posts: 25
Is there a java code where I can pass the Package name and get the implementation-version of that package from its manifest.mf file.

My requirement is that I have 5 different jar files in diffrent folders. I have to find the Implementation version from each of the jar files and diplay them as output.
Horatio Westock
Ranch Hand

Joined: Feb 23, 2005
Posts: 221
I'm not sure exactly what you mean, but you could use the classes in the java.util.jar package to read the manifests of each jar.

If this is what you mean, and you need more help, then just ask again.
Ravi Pydi
Greenhorn

Joined: Sep 01, 2002
Posts: 25
Thanks Horatio,
Thats exactly what I have used and it worked.
Horatio Westock
Ranch Hand

Joined: Feb 23, 2005
Posts: 221
Great!
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
If you are using a recent Java version, it's much easier to use the methods on the Package class: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Package.html


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: jrebel
 
subject: How to find Implementation Version for various packages?
 
Similar Threads
Check for latest version check of JWS
implementation and interfaces in seperate jar files
Packages
compiling package in Unix
Jars within Jar