eubnara / study

6 stars 2 forks source link

java tutorials #250

Open eubnara opened 2 years ago

eubnara commented 2 years ago

https://docs.oracle.com/javase/tutorial/

eubnara commented 2 years ago

MANIFEST.MF 파일에 Class-Path 를 명시함으로써 다른 jar 파일의 클래스들을 참조할 수 있다. 허나, jar 안에 들어있는 jar 를 참조할 수는 없다.

Spring Boot 에서는 jar nesting 을 하는 다른 방법을 취하고 있다.

Spring Boot takes a different approach and lets you actually nest jars directly.

https://docs.spring.io/spring-boot/docs/2.2.4.RELEASE/reference/html/getting-started.html#getting-started-first-application-executable-jar


Executable jars and Java

Java does not provide a standard way to load nested jar files (jar files that are themselves contained within a jar). This can be problematic if you are looking to distribute a self-contained application.

To solve this problem, many developers use “uber” jars. An uber jar packages all the classes from all the application’s dependencies into a single archive. The problem with this approach is that it becomes hard to see which libraries are in your application. It can also be problematic if the same filename is used (but with different content) in multiple jars.

Spring Boot takes a different approach and lets you actually nest jars directly.

https://docs.spring.io/spring-boot/docs/2.2.4.RELEASE/reference/html/appendix-executable-jar-format.html#executable-jar