Jar version?

Sometimes I get a third party JAR that does not contain a version number in the file name, and I need to know what version of that library the JAR file contains. For instance, say the file is foobar.jar and it was version 1.2.0. How do I determine that the foobar.jar file I have is version 1.2.0?
Someone told me that you can use the following command "java -jar jarname.jar -v" to retrieve the version number from a JAR file, but I've never gotten any output when using that command. I see that many JARs have MANIFEST.MF entries with version info. Is there a manifest entry key that the java -jar command listed above is looking for in a manifest? If not, what does the java -jar command listed above supposed to retrieve and from where? I tried inserting a manifest entry of "Version" with a value, but the command listed doesn't retrieve that.

I see that many JARs have MANIFEST.MF entries with version info.
Yes - and those entries MUST HAVE a predefined format. See the Oracle docs
JAR File Specification
Is there a manifest entry key that the java -jar command listed above is looking for in a manifest? If not, what does the java -jar command listed above supposed to retrieve and from where? I tried inserting a manifest entry of "Version" with a value, but the command listed doesn't retrieve that.
Refer to the doc above:
Manifest Specification:
  manifest-file:                    main-section newline *individual-section
  main-section:                    version-info newline *main-attribute
  version-info:                     Manifest-Version : version-number
  version-number :               digit+{.digit+}*
  main-attribute:                 (any legitimate main attribute) newline
  individual-section:            Name : value newline *perentry-attribute
  perentry-attribute:            (any legitimate perentry attribute) newline
  newline :                            CR LF | LF | CR (not followed by LF)
   digit:                                {0-9}
See the definition for 'Manifest-Version' in that spec? That is what contains the version number if the vendor provides one.

Similar Messages

  • Any way to get Java Plug-In-like handling of jar versions?

    I have jars intended for use with the Java Plug-In with version #'s in properties files (computed by the various tooling for updating these on the server). The jars themselves have no notion of jar #.
    I would like to re-use these jars and version #'s with Java Web Start to avoid conditional GETs, but without jar diffing in this case (as I already have many small jars due to lack of jar diffing in the Java Plug-In).
    Is there any way I can get Java Web Start to act like the Java Plug-In in this regard (i.e. the jar version # is a statement from the server, the client does a normal GET against the jar URL if its own version is not that stated by the server)?
    [Don't get me wrong, jardiffing is cool, but having to do everything differently between Java Web Start and the Java Plug-In is [b]not cool.

    Best way IMO would be to create a Socket connection to it so that you could connect with a client app and feed in data that way

  • JMF, Linux, wrong codec selected when using jarred version of app

    I have problem realising an AVI player when I try and run Linux JMF application when whole application is bundled into jar file and I try and run it using
      java -cp <..JMF/lib/jmf.jar:/home/codroe/fobs4jmf.jar..> -jar app.jarIn jmf.log I see:
    ## Player created: com.sun.media.content.unknown.Handler@1cd2e5f
    ##   using DataSource: com.sun.media.protocol.file.DataSource@911f71
    ## Building Track: 0
    ## Input: XVID, 720x576, FrameRate=25.0, Length=1244160 68 extra bytes
    !! Failed to handle track 0
    XX   Unable to handle format: XVID, 720x576, FrameRate=25.0, Length=1244160 68 extra bytesThis is exactly the message I usually get when some part of JMF cannot find "jmf.properties" file (if for example could not find .jmfdir), but looking at strace from application run it does appear JMF found my jmf.properties this time, but still chose not to use omnvidea codec:
    stat64("jmf.properties", 0xfeffc410)    = -1 ENOENT (No such file or directory)
    stat64("/home/codroe/JMF-2.1.1e/lib/jmf.properties", {st_mode=S_IFREG|0644, st_size=31354, ...}) = 0
    open("/home/codroe/JMF-2.1.1e/lib/jmf.properties", O_RDONLY|O_LARGEFILE) = 11When I run my unbundled (i.e. not wrapped up in jar) version of Linux application (same classpath), it finds jmf.properties no problem, and choses omnivoidea codec and now is able to play the video with good things in jmf log:
    ## Player created: com.sun.media.content.unknown.Handler@30c221
    ##   using DataSource: com.omnividea.media.protocol.file.DataSource@a401c2
    ## Building Track: 0
    ## Input: FFMPEG_VIDEO, 720x576, FrameRate=25.0, Length=414720 0 extra bytesMy windows version works fine in both configurations, jarred or not jarred.
    From Linux strace log I it shows my working non-JARed version has selected omnividea codec:
    gettimeofday({1100876842, 175149}, NULL) = 0
    stat64("/home/codroe/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
    stat64("/home/codroe/JMF-2.1.1e/lib/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
    gettimeofday({1100876842, 179815}, NULL) = 0
    stat64("/home/codroe/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
    stat64("/home/codroe/JMF-2.1.1e/lib/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
    gettimeofday({1100876842, 182979}, NULL) = 0
    gettimeofday({1100876842, 183206}, NULL) = 0
    gettimeofday({1100876842, 184371}, NULL) = 0
    gettimeofday({1100876842, 184591}, NULL) = 0
    stat64("/home/codroe/com/omnividea/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
    stat64("/home/codroe/JMF-2.1.1e/lib/com/omnividea/media/protocol/file/DataSource.class", 0xfeffc384) = -1 ENOENT (No such file or directory)
    gettimeofday({1100876842, 191005}, NULL) = 0but as I don't see this in trace from JAR version, and because in JMF log it says:
    ## Player created: com.sun.media.content.unknown.Handler@30c221
    ##   using DataSource: com.omnividea.media.protocol.file.DataSource@a401c2I believe it has not selected correct codec for a reason I don't understand.
    [I checked I only have one version of jmf.properties on system].
    Any ideas why jarred version is different from non-jarred version?
    version information:
    # JMF Version 2.1.1e
    ## Platform: Linux, i386, 2.6.5-1.358
    ## Java VM: Sun Microsystems Inc., 1.5.0
    and using fobs4jmf from http://fobs.sourceforge.net

    correction, for the last bit I should have said, for non-working jarred version in JMF log I see:
    ## Player created: com.sun.media.content.unknown.Handler@1cd2e5f
    ##   using DataSource: com.sun.media.protocol.file.DataSource@911f71indicating wrong codec selected

  • Issue with CIS jar version  - cis-application-8.0.0.jar on content server

    We are having a problem adding this jar to our custom component. We are using this APIs to check-in some programatically.
    Following is the error when we try to deploy our component with this jar
    ===============================================================
    IdcAdmin: Content Server idc status: Stopped successfully
    Starting the Content Server idc... The server terminated unexpectedly.
    02.28 11:36:35.834 main NativeOsUtils version mismatch. The native code version is "7.1.0.2" and the Java version is "7.0.6.0".
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGSEGV (0xb) at pc=0x00002ac72c918500, pid=26841, tid=47034930753168
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_11-b03 mixed mode)
    # Problematic frame:
    # V [libjvm.so+0x3a8500]
    ========================================================
    The content server version is 10.1.3.3.
    And the jar version is cis-application-8.0.0.jar. We are able to use the same jar standalone. What could be the problem? Should we need to upgrade to a diffrent jdk version? I am worried that might cause more problems.
    Regards,
    Pratap

    Thanks for your inputs.
    So far I have been looking at only CHECKIN_NEW_FORM and CHECKIN_SEL_FORM services for creating and updating content. items These services require files to be attached. I checked the definitive guide and found that there are 2 other similar services,CHECKIN_NEW and CHECKIN_SEL, that don't need the file to be attached. Instead we can specify the file path of the primary file. Since the xml content file to be checked is in th content server itlsef, these services can be used in my case. Moreover since my content checkin logic is in the context of a service, my code become more simpler.
    I began working on it and am calling executeServiceSimple("CHECKIN_NEW") or executeServiceSimple("CHECKIN_SEL") based on whether the content to be checked in is new or to be updated. I am setting all the metadata values of the content file in the m_binder local data of the service object.
    I thought this should work cleanly but I am getting the below error
    ============================================
    at intradoc.server.IdcServerThread.run(IdcServerThread.java:197)
    Caused by: intradoc.data.DataException: !csCheckinFileKeyNotSpecified,primaryFile
    at intradoc.server.DocServiceHandler.addFile(DocServiceHandler.java:3251)
    at intradoc.server.DocServiceHandler.addFiles(DocServiceHandler.java:410)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:617)
    at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:293)
    at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
    at intradoc.server.Service.doCodeEx(Service.java:490)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at sitestudio.SSClassHelper.invokeRaw(Unknown Source)
    ======================================================
    I printed out all the local data in the m_binder object. The primaryFile value is pointing to the right file path. The file is also been created in the correct location.
    The dID, dDocName, dOriginalFile, dRevLabel values are all set properly. But still I am getting this error. I am not able to figure out the cause of this. Please help. Is this approach incorrect?
    -Pratap

  • Help on jar versioning

    I cant seem to get versioning on jar files to work.
    In my .jnlp file I have:
    <jar href="images.jar" version="1.3"/>
    I named the jar file to images__V1.3.jar.
    But I get an exception:
    "Missing version field in response from server when accessing resource ("http://..../images.jar, 1.3)"
    It sounds like I'm defining it wrong in the .jnlp? Am I missing a tag somewhere?
    When I dont use a version, ie just images.jar, everything works ok.
    I am using Java WebStart 1.2.0_01.
    Thanks

    If it is any comfort I am having the same problem, so I will be very interested in the answer as well.
    I have tried both versioning using file naming and including a version.xml file in the directory.
    Was using the developers guide document as a reference.
    Andreas

  • Where get weblogic.jar version 8.1 or 9.2?

    I need to get weblogic.jar version 8.1 or 9.2 to use with Hermes because 10.3 apparently does not have class weblogic/security/subject/AbstractSubject... I failed finding it on the net...
    Thank you
    Leonard

    I've got the exakt same problem using weblogic.Deployer .... -appversion, weblogic 10.0 in this case. Works fine with our new jaxws based webservices.
    Would be nice if this problem was solved, especially since weblogic10 resolves softlinks so our old method of linking to new versions doesn't work anymore. And the fact that "Changing the source location is not allowed for a previously attempted deployment" doesn't help either.

  • EJB JAR Versioning

    I am using jdk version 1.3.1_02.
    How I can know which version of EJB JAR I need to use (1.1, 2.0, 2.1) sam for JTA JAR file.
    I looked in the JAR's documents and I couldn't find a word about versioning comptability.
    Thank you.

    The J2EE version (or appropriate sub-set) must be compatible with what the application server supports - the JDK version does not (necessarily) have anything to do with it.

  • BEA WebLogic 10.3 JMS Jar version

    Hi,
    Someone knows what specific version of JMS BEA Jar should be used when connecting to a 10.3 JMS BEA Server from a PI 7.0 system?
    Thanks in advance.

    I tried that but I could not find it, do you have the link?
    Thanks.

  • Can I get jar version from class run from within jar ?

    I am launching a number of applets from a single jar file. I want to display jar file version on initial applet. I would ideally like the applet to be able to determine from the jar file which it was part of what version it is . Is this possible ?
    Applets are swing based & I'm using java plugin

    if your jar file has a manifest that specifies the version number, you can use java.util.jar.JarFile to get the information. Other wise, you would just have to induce it based upon the file attributes of the jar file, using java.io. Remember that applets can not, by default, read the local file system, so you might have to use signed applets.

  • DeployJava.js update JAR versions

    Hello,
    I am using deployJava.js to deploy my applet. It works great and correctly caches the applet locally on the users machine.
    However, when I want to update the applet server-side, it does not detect that the file has changed and the client does not get the new version.
    the APPLET tag had a great feature where you could go:
    <param name="cache_version" value="0.0.6.B">
    and incrementing the value of this would force the client to re-download that JAR since it had been changed.
    I have tried adding this parameter in the deployJava.js case but it has no effect.
    Any help would be appreciated.
    Jesse

    Apparently no one has reported this is a bug on the bug parade. I did that, for what it's worth. I am shocked that this has been allowed to remain open for two years.

  • Activation.jar and mail.jar version ????

    I have deployed a web service in Weblogic v7.0 which accepts DataHandler as one
    of its paramters ( for attachments).
    When I invoke from a soap client (weblogic v8.0) it works fine. For using with
    soap client (weblogic v7.0) its
    gives a serializer exception.
    What version of activation.jar and mail.jar should I use for sending attachment
    from weblogic 7.0 client.
    Regards
    Kumar Raj

    Hi Kumar,
    Could you post the exception traceback and clarify the configuration
    (v7.x client to v7.x server fails, but v8.1 client to v7.x server works
    OK?)
    You may also want to take a look at the docs on creating portable stubs
    [1] associated with creating the client jar.
    Thanks,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/client.html#1076586
    Kumar Raj wrote:
    >
    I have deployed a web service in Weblogic v7.0 which accepts DataHandler as one
    of its paramters ( for attachments).
    When I invoke from a soap client (weblogic v8.0) it works fine. For using with
    soap client (weblogic v7.0) its
    gives a serializer exception.
    What version of activation.jar and mail.jar should I use for sending attachment
    from weblogic 7.0 client.
    Regards
    Kumar Raj

  • Classes12.jar and nls_charset12.jar Version

    I am running a java application that talks to 9.2.0.1 Oracle database. I am using classes12.jar,ocrs12.jar and nls_charset12.jar and neither of the jars have a manifest file with a verson number. The classes in the classes12.jar and ocrs12.jar were compiled on 5/17/2001 and the classes in nls_charset12.jar were compiled on 7/13/2000. I need to know what version these jars are, is there any way for you to tell me based on the compilation dates. I tried looking on Oracle download sites for the 9.2.0.1 jdbc jars and they all had classes that were compiled on different dates.
    thank you very much

    You can find out the version of the JDBC driver you're using by creating a DatabaseMetaData object and querying it. The snippet below should work:
        DatabaseMetaData meta = conn.getMetaData();
        // gets driver info:
        System.out.println("\n=============\nDatabase Product Name is ... " +
                           meta.getDatabaseProductName());
        System.out.println("\nDatabase Product Version is " +
                           meta.getDatabaseProductVersion());
        System.out.println("\n=============\nJDBC Driver Name is ........ " +
                           meta.getDriverName());
        System.out.println("\nJDBC Driver Version is ..... " +
                           meta.getDriverVersion());
        System.out.println("\nJDBC Driver Major Version is " +
                           meta.getDriverMajorVersion());
        System.out.println("\nJDBC Driver Minor Version is " +
                           meta.getDriverMinorVersion());
        System.out.println("\n=============");I know of no way, however, to get this information based on the compilation dates of the files.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

  • NetWeaver jar versioning handling

    Hi
    While trying to deploy my application on netwaver 7.1 i'm getting errors that indicates that app server cant handle a version number in a jar file name.
    For instance an error:
    "Class-path entry activation.jar specified in (...) MANIFEST.MF file cannot be resolved."
    although activation-1.1.jar exists on the class path. Once the the version suffix is removed it doesn't complain.
    is there any solution for that, besides changing jar names?
    Br
    PF

    Hi
    I think the problem lays somewhere else.
    My application works fine under jboss, but its because it doesn't check manifests recursively - in other words, the class-path entries located in the jars, which are in the ear below the top level are ignored.
    To make things more clear
    my-app.ear
        META-INF/application.xml
        my-ejb.jar
            META-INF/MANIFEST.MF Class-Path: ext/lib1.jar
            tld/domain/MyEJB.class
            tld/domain/MyEJBRemote.class
            tld/domain/MyEJBRemoteHome.class
            ext/lib1.jar
               META-INF/MANIFEST.MF Class-Path: lib2.jar
                tld/domain/A.class
             ext/lib2-1.0.jar
                tld/domain/B.class
    Neither the j2EE or the ejb spec talks about recursively
    solving all jar dependencies, therfore jboss only checks my-ejb.jar/maniifest.mf (top level - as stated before).
    However netwevaer does smth. different - checks them all.
    Most of the jars contains a manifest that reffers through a class-path entries to other jars without a version suffix - and here is the root cause of my problem.
    How can i avoid this recursive check?
    Br
    PF

  • JAR Versioning

    Hi,
    I am trying to use a manifest file to version my jar, it contains a number of different packages but I just want to version the whole jar. I have tried a using the implementation and specification tags, but I seem to be unable to retrieve the manifest data from the jar. I do not get any errors but neither do I get a version number.
    Here is the contents of my manifest:
    Manifest-Version: 1.0
    Created-By: My Company
    Name: com.xx.yyy.ppp.ttt.hy
    Implementation-Title: "jar name"
    Implementation-Version: "1.2.6"
    Implementation-Vendor: "My company"
    I have tried with and without quote marks, I have tried using the Package Class to list out all the packages and the implementation and specification versions and all i get is nulls for my packages and the JRE info.
    Am I missing something here, I have looked around on the forums and the specs and I cant see what I am missing so any help would be great.
    Thanks!

    Hi, I tried it out and it works.
    My manifest.mf looks like this:
    Manifest-Version: 1.0
    Implementation-Version: 3.1415
    the code I use to retrieve the info is
    public static void main(String[] args) {
    Class clazz=myClass.class;
    String version=clazz.getPackage().getImplementationVersion();
    System.out.println("version="+version);
    I got the 3.1415 in the output!

  • JCo Connector  (jco.jar) version 2.1.8 certified for use against R/3 4.6c ?

    I would like to know if SAP has certified the JCo connector version 2.1.8 for connecting with R/3 4.6c systems.  The JCo connector is used by an iWay connector in an Oracle application server version 10.1.2.
    Can anyone comment on this? Thanks!

    Hello Philip,
    the offical supported release by JCo 2.1.8 are listed on the given link above:
    https://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000463654&
    ->  "Supports R/3 3.1I and higher (and other SAP Components that have BAPIs or RFMs)."
    So this is a SAP product/technology we support always the highest version number. Have a look at SAP note 549268 under the chapter "Solution Support Strategy for SAP JCo" for official support statements.
    Of course i cannot comment on the support level of the other vendors which are using this technology. If you want you can open a support call at SAP to get a more specific answer to your question.
    Hope this information is useful for you,
      Juergen

Maybe you are looking for

  • HDMI output not working after 1.0.8.6067 update on sharp LCD TV's

    Have three TV's two of which are Sharps Aquos and the other is a Samsung. After updating to 1.0.8.6067 the Playbook cannot detect the two Sharps(each different model #'s) . I have three different cables that worked fine before the update and all thre

  • How can I share a Tiger server's User database to a Panther server?

    I need some help to set this up. Keep in mind I do not have a DNS server. I have a Tiger server with Xserve and an older Panther server, both on the same local network. I have a whole bunch of users setup on the Tiger server. The Panther server does

  • Muse created index page not available on BC

    I'm creating a website on Muse and have published it as a temporary file to BC.  All pages, files, images, etc. are there except for my index page! I have published and re-published multiple times and still can't find it on my page list.  Another str

  • IPhone 4 Boot Loop

    I bought an iPhone 4 from Facebook and when it boots up it dose some pretty funky stuff. sometimes it boots and works for a bit then a solid blue screen comes up then it reboots to the apple logo witch is deformed (see in photo) anyone help?! I tried

  • Error loading shared libraries: libjox8.so

    just started after running smoothly for a couple of months on 8i Enterprise 8.1.5 for Linux. I receive this error server side when I attempt to connect via SQLPlus from a client: 'undefined symbol: t_pool_put_static_fld' And, on the client side I get