*/\r
public static void main(String[] args) {\r
File av = new File(args[0]);\r
+ boolean jfailed=false;\r
try {\r
JarFile jf = new JarFile(av, false, JarFile.OPEN_READ);\r
if (jf.getEntry("vamsasDocument.xml")!=null)\r
System.out.println("Valid archive "+av);\r
}\r
jf.close();\r
+ return;\r
+ } catch (Exception f)\r
+ {\r
+ System.out.println("Couldn't access jar archive "+av);\r
+ f.printStackTrace(System.out);\r
+ }\r
+ try {\r
+ System.out.println("Trying the Apache Zip Package:");\r
+ org.apache.tools.zip.ZipFile jf = new org.apache.tools.zip.ZipFile(av);\r
+ if (jf.getEntry("vamsasDocument.xml")!=null)\r
+ {\r
+ System.out.println("Valid archive "+av);\r
+ }\r
+ jf.close();\r
} catch (Exception f)\r
{\r
System.out.println("Couldn't access jar archive "+av);\r