Retrieve Implementation-Version from manifest file using jnlp?

Discussion in 'JavaScript' started by toolsmith, Jan 4, 2010.

  1. #1
    This is more of a java question directly. I'm trying to retrieve the "Implementation-Version" from my manifest file from my main jar file with java webstart. My curent code looks something like this:

    URL url = this.getClass().getResource("/MainProgram.jar");
    System.out.println("URL: " + url.getPath());

    JarURLConnection jurlConn = (JarURLConnection)url.openConnection();
    Manifest mf = jurlConn.getManifest();
    Attributes attr = mf.getMainAttributes();

    System.out.println(attr.getValue("Implementation-Version"));

    url is always null...any idea what I'm missing?

    Thanks,
    -Paul
     
    toolsmith, Jan 4, 2010 IP