Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8479511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:02:50+00:00 2026-06-10T19:02:50+00:00

When I was working with XCode and iOS, there was a simple way to

  • 0

When I was working with XCode and iOS, there was a simple way to check the application’s current version by reading the plist.

Is there a similar way to do this in Java?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:02:52+00:00Added an answer on June 10, 2026 at 7:02 pm

    XCode stores that version value in a resource file that is distributed with your application. In Java the equivalent would be your Manifest file, which is packed inside your JAR/WAR/EAR archive.

    A Manifest file is just a metadata text file named MANIFEST.MF that stores some standard key/value pairs which are recognized by many tools and that is packaged inside a special folder named META-INF inside your java archive.

    To get the Manifest file for your own JAR this question would give you some clues. Once you have your own Manifest instance then use either one of the next options to get that version value.

    This way to get the Specification Version:

    Manifest mf = .... // get the manifest file
    String specVersion = mf.getAttribute("Specification-Version");
    

    This way to get the Implementation Version:

    Manifest mf = .... // get the manifest file
    String specVersion = mf.getAttribute("Implementation-Version");
    

    More info regarding the JAR manifests can be found here.

    EDIT:

    If you are getting null values for any of those properties that means that they haven’t been configured in your MANIGEST.MF file. That’s easy to check: unzip your JAR file (JAR files are just ZIP files with a different extension name) and go the META-INF folder to find the MANIFEST.MF file, since it’s a text file you can print its contents to the console, if there is a Specification-Version or Implementation-Version attribute defined there and you are still getting null values then you might be loading a manifest file from a different JAR.

    FOR THE RECORD:

    To get that attributes in your Manifest file you would need to configure your build tool to do so. Maven would do it automatically (you can customize it though), with Ant you will need to use a specific Ant Task, with Eclipse you will need go through its docs (same with any other IDE).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on Xcode version 4.4. Couldn't find the way how to change element's(UIView)
I am doing iOS project in Xcode . It was working properly but now
My Xcode's snapshot feature isn't working well. (version 4.2.1) I have used the snapshot
I am working with Objective-C in Xcode. I was wondering is there any mechanism
Currently i am working on Xcode 4.2 with iOS 5 sdk. I have created
I've been working on my first XCode/iOS project and so far it's been an
My iphoneos 3.1 based application is not working on iOS 4 GM: the camera
In the current xcode organizer there is Library / Developer Profile. Currently I have
First things first, there are many questions similar to this, I know, but I
After installing Xcode 3.2.5 iOS 4.2 an app that was perfectly working stopped working.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.