JAR vs WAR file specification

前端 未结 4 1499
我寻月下人不归
我寻月下人不归 2020-12-21 08:57

I noticed that WAR files are supposed to have classes/ and lib/ directories for containing their classfile root and dependencies, respectively.

4条回答
  •  青春惊慌失措
    2020-12-21 09:48

    WAR files (mainly WEB applications) are uncompressed, and all JAR files inside the lib folder will be in the classpath of your web application while running.

    JAR files might also contain jar files, but will not be found and loaded by the default class loader.

    There are special class loaders that do load jar files inside jar files, but not standard.

提交回复
热议问题