Getting version information from the manifest

A

Andrew Thompson

I am attempting to implement the code for getting
version information* shown on the 'Getting a
property from MANIFEST.MF?'** thread

* <http://groups.google.com/group/comp.lang.java.programmer/msg/
3ac4e320e07f65f9>
** <http://groups.google.com/group/comp.lang.java.programmer/
browse_frm/thread/878e34a5e2b85310/3ac4e320e07f65f9>
(..and since I brought it up, brilliant thread, so
glad to be proven wrong yet again!)

I am calling the code from the ..
org.pscode.ui.applet.appleteer.PseudoBrowser
...class and while getting the package successfully,
it is returning null for the Implementation and
Specification Title, Vendor and Version.

Here is the manifest, written by Ant and ostensibly
working (Jar successfully launches on double click)

<manifest>
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.6.0-b105 (Sun Microsystems Inc.)
main-class: org.pscode.appleteer.Appleteer

Name: org/pscode/ui/applet/appleteer
Implementation-Title: Appleteer
Implementation-Vendor: PSCode - Andrew Thompson
Implementation-Vendor-Id: org.pscode
Implementation-Version: 8.12
Specification-Title: Appleteer
Specification-Vendor: PSCode - Andrew Thompson
Specification-Version: 8.12

</manifest>

I also tried ..

Name: org.pscode.ui.applet.appleteer

...and got the same 'null' effect.

Can anyone spot what I am doing wrong?
 
A

Arne Vajhøj

Andrew said:
I am attempting to implement the code for getting
version information* shown on the 'Getting a
property from MANIFEST.MF?'** thread

* <http://groups.google.com/group/comp.lang.java.programmer/msg/
3ac4e320e07f65f9>
** <http://groups.google.com/group/comp.lang.java.programmer/
browse_frm/thread/878e34a5e2b85310/3ac4e320e07f65f9>
(..and since I brought it up, brilliant thread, so
glad to be proven wrong yet again!)

I am calling the code from the ..
org.pscode.ui.applet.appleteer.PseudoBrowser
..class and while getting the package successfully,
it is returning null for the Implementation and
Specification Title, Vendor and Version.

Here is the manifest, written by Ant and ostensibly
working (Jar successfully launches on double click)

<manifest>
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.6.0-b105 (Sun Microsystems Inc.)
main-class: org.pscode.appleteer.Appleteer

Name: org/pscode/ui/applet/appleteer
Implementation-Title: Appleteer
Implementation-Vendor: PSCode - Andrew Thompson
Implementation-Vendor-Id: org.pscode
Implementation-Version: 8.12
Specification-Title: Appleteer
Specification-Vendor: PSCode - Andrew Thompson
Specification-Version: 8.12

</manifest>

I also tried ..

Name: org.pscode.ui.applet.appleteer

..and got the same 'null' effect.

Can anyone spot what I am doing wrong?

Based on SUN's exampled then try:

Name: org/pscode/ui/applet/appleteer/

Arne
 
M

Mark Thornton

Andrew said:
Perfect - working now. Thanks.

If you don't have anything else in the jar, don't bother with a section
--- put the version info in the main section.
 
A

Andrew Thompson

If you don't have anything else in the jar, don't bother with a section
--- put the version info in the main section.

Thanks. I might try that, but the manifest is
looking to become more complicated as I separate
the common components into other Jar's, and I
will probably want versioning information on
roughly a 'per package' basis.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top