Joke Collection Website - Blessing messages - What is the use of jar package in java?

What is the use of jar package in java?

Is an executable file package. Simply put, the jar package is an outsourcing. 、

A Java program consists of several parts. Class file. These. Class files must be stored in the directory according to the Bao Butong classification to which they belong; Before running, you need to assign the root directories of all used packages to the CLASSPATH environment variable or the -cp parameter of the java command; At runtime, you must enter the console and use java commands to run. If you need to double-click Run, you must write a batch file (. Bat) or Linux shell program.

When installing JRE(Java runtime environment) under Windows, the installation file will. Jar file to be opened by javaw.exe. Then, for the executable JAR package, the user only needs to double-click it to run the program.