• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Versioning using manifest for multiple packages in a single jar

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having trouble trying to use the package class to read the version of a specific package from a maifest that contains information about multiple packages. According to Sun specs, you should be able to include information about multiple packages by separating them with a Name. for instance, if my hierarchy is
com.a.b
|
|---com.a.b.c
and I include in the manifest file,
Manifest-Version: 1.1
Name: com/a/b
Specification-Title: my App package
Specification-Vendor: someone Inc
Created-By: someone
Implementation-Vendor: someone
Specification-Version: 1.1
Implementation-Version: build1
Implementation-Title: com.a.b
Name: com/a/b/c
Specification-Title: my App package
Specification-Vendor: someone Inc
Created-By: someone
Implementation-Vendor: someone
Specification-Version: 1.2
Implementation-Version: build2
Implementation-Title: com.a.b.c
Now if I try to read the specific attributes for package com.a.b.c using Package.getPackage("com.a.b.c").getSpecificationVersion();, I find this to be null. Has anyone had any experience with this?
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings Greenhorn,
Welcome to JavaRanch, the absolute best site on the www for Java information. We don't have many rules around here, but we do have one. Please change your display name to a first and last name to conform with the JavaRanch Naming Policy.
You can change it here: Change your display name.
 
Sunglasses. AKA Coolness prosthetic. This tiny ad doesn't need shades:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic