The jar is a packaged file of Java class, we can package our own project as a jar file to run, or we can package it as a third-party package, sometimes we need to look at whether there is a class in a jar file and the corresponding package, we can use the following two ways:
① using the Software
Jd-gui is a cross-platform software that we can easily install on OSX and other systems, and then drag the jar file into the Jd-gui.
② using the Zip tool
The jar package is a zip file that we can extract directly after viewing, here is a simple example.
Yddemacbook-pro:tmp yd$ lsjfxrt.jaryddemacbook-pro:tmp yd$ unzip-x-Q Jfxrt.jar- d jfxrtyddemacbook-pro:tmp YD$ LSJFXRT jfxrt.jaryddemacbook-pro:tmp yd$ cd jfxrtyddemacbook-pro:jfxrt yd$ lsmeta-inf MediaErrors_ Es.properties mediaerrors_ja.properties mediaerrors_sv.properties Classes Netscapemediaerrors.properties mediaerrors_fr.properties mediaerrors_ko.properties MediaErrors_zh_ Cn.properties commediaerrors_de.properties mediaerrors_it.properties mediaerrors_pt_br.properties Mediaerrors_zh_tw.properties JAVAFXYDDEMACBOOK-PRO:JFXRT yd$
use Unzip to extract the jar file, showing the internal files, but this method is not easy to use Jd-gui.
For more blogs, go to the little fat Xuan.
Check the jar file under OSX