Code example for JarURLConnection

Methods: getJarFile

0
		try { 
			// Get jar connection 
			connection = (JarURLConnection) url.openConnection();
 
			// Get the jar file 
			jarFile = connection.getJarFile();
 
			// Get the manifest 
			Manifest manifest = jarFile.getManifest();
 
			// Get the manifest entries 
			Attributes attributes = manifest.getMainAttributes();
 
			Attributes.Name name = new Attributes.Name(BUILD_TIMESTAMP);
			return attributes.getValue(name);
		} catch (Exception e) {
			String message = "Failed getting the current release info: "
					+ e.getMessage();
			logger.log(Level.WARNING, message);
		} 
		return null;