Posts

Showing posts with the label Jar file inside a zip file

Get JBoss Version using Java Code

The following are the things we will be looking into now. a) How to get the JBOSS version from JBOSS zip file using java code? b) How to get the JBoss version from JBoss folder using java code? c) How to get the manifest details of a jar file that is present inside a Zip file? The actual version of JBoss can be determined by using the run.jar file present inside the bin folder of JBoss. It is not that difficult to get the manifest details of any jar file present either inside a folder or in a zip file[If you think it is difficult, don't worry,very soon we will make it easy for you] We are here trying to get the manifest details of the run.jar file, which answers all the questions we have posted above. The first method "getJbossVersion(String sourcefile)" in the code snippet below not only tells us how to get the Version of JBoss, but also tells us how to get the contents of MANIFEST.MF file that is present inside a jar file which in turn is again present insi...