Wednesday, 1 May 2013

Open Executable Jar In java

Jar files are used for archiving and archive unpacking. One of the essential features of .jar file is loss-less data compression.
If you want to run a .jar java file Try This :-


public static void main(String arg[]) {

try {
Process p = Runtime.getRuntime().exec(" java -jar resources/progress.jar"); // Specify Your .jar path 
} catch (IOException ex) {
ex.printStackTrace();
Logger.getLogger(OpenJar.class.getName()).log(Level.SEVERE, null, ex);
}
}