File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/packaging Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 44
55
66[[packaging.efficient.unpacking]]
7- == Unpacking the Executable JAR
7+ == Unpacking the Executable jar
88
99You can run your application using the executable jar, but loading the classes from nested jars has a small startup cost.
1010Depending on the size of the jar, running the application from an exploded structure is faster and recommended in production.
1111Certain PaaS implementations may also choose to extract archives before they run.
1212For example, Cloud Foundry operates this way.
1313
1414Spring Boot supports extracting your application to a directory using different layouts.
15- The default layout is the most efficient, and is xref:#deployment.efficient.cds [CDS friendly].
15+ The default layout is the most efficient, and is xref:reference:packaging/class-data-sharing.adoc [CDS friendly].
1616
17- In this layout, the libraries are extracted to a `lib/` folder, and the application JAR
17+ In this layout, the libraries are extracted to a `lib/` folder, and the application jar
1818contains the application classes and a manifest which references the libraries in the `lib/` folder.
1919
20+ To unpack the executable jar, run this command:
21+
2022[source,shell]
2123----
2224$ java -Djarmode=tools -jar my-app.jar extract
25+ ----
26+
27+ And then in production, you can run the extracted jar:
28+
29+ [source,shell]
30+ ----
2331$ java -jar my-app/my-app.jar
2432----
2533
You can’t perform that action at this time.
0 commit comments