so I am trying to see if a .jar is valid or not, by checking some values in the mainfest file. What is the best way to read and parse the file using java? I thought of using thi
The problem with using the jar tool is that it requires the full JDK to be installed. Many users of Java will only have the JRE installed, which does not include jar.
Also, jar would have to be on the user's PATH.
So instead I would recommend using the proper API, like this:
Manifest m = new JarFile("anyjar.jar").getManifest();
That should actually be easier!