Why do you want to hit the jar bag?
1. Because the user will not run the class file, and will not compile the Java files, they will only double-click Open ...
2. If you develop 100 classes for others to use, wouldn't you give someone 100 class files?
That's too messy, just give him a file: Package 100 class files into a jar file
To hit a jar package:
Need to use the development tools (Jar.exe) to the JDK.
Usage of jar:
Jar CVF jar file name class file or folder
For example, the test folder under the current directory is called a jar package named CT
jar CVF Ct.jar test
Double hit the good Ct.jar file, and nothing happens ... A good shot into a jar, the user double-click open to run it???
Things to note in the jar pack:
1. After a program has finished the jar, you must specify the entry class on the manifest file: Format main-class: Package name. class Name
2. jar package Double-click to run a program that works only for the graphical interface, which does not work for the console program.
The role of the jar file:
1. Easy for users to run a project quickly.
2. Provide tool classes to others in the form of a jar package.
If you use the class inside the jar package, you must first set the Classpath path.
Classpath path not only affects Java virtual machines, but also affects Java compilers
JRE = jvm+ Core Class Library
Hit Jar bag