Java – why is meta-inf called meta-inf?
I'm trying to explain the basic principles of web applications I encountered this problem on Meta - inf and Web - inf How do those directories get these names?
Solution
Jar files are actually zip files with additional information and may be better indexed When packaging additional information into a zip file, it becomes important to place it where it is unlikely to conflict with the contents of an ordinary zip file
Choosing meta - inf as the directory where you can store information about jar files is an attempt to use the directory as a namespace in the zip file Basically, if it is stored in meta inf, it is meta data information, or (choose the possible meaning of meta), "self information" or "abstract information"
In this way, the information of the zip file that affects the zip file itself can be stored without destroying the packaging of the zip file This is key because it prevents the creation of a new portable compression format and extends it to the purpose of Java code packaging As people get used to the usefulness of meta - inf, new "namespaces" in zip files are created for specific packaging formats, such as "Web - inf"
The first "extension" of the zip file format is the added list (manifest. MF) and the optional added index list (used to speed up project extraction) Now, such a file (due to its known extended namespace) can be extended in many other ways, such as the recent addition of a subdirectory "service" for service registration
When you think a zip file contains files and directories, it makes sense to use directories as namespaces