Archive for the 'jar' Category

Determine a the JDK version used to make a JAR file

Friday, April 25th, 2008

Maybe there’s already a tool to do this, but a quick Google search only yield this tip.  So, I made a quick little JAR reader to fetch the estimated version from the manifest:

import java.util.*;
import java.util.jar.*;
import java.io.*;
 
/*
* Sends the "estimated" JDK version (expected to be in the jar manifest "Created-By" attribute)
* to System.out.
*/
public [...]