@@ -449,8 +449,17 @@ of this guide.
449
449
[[deployment-install]]
450
450
== Installing Spring Boot applications
451
451
In additional to running Spring Boot applications using `java -jar` it is also possible
452
- to make fully executable applications for Unix systems. This makes it very easy to install
453
- and manage Spring Boot applications in common production environments.
452
+ to make fully executable applications for Unix systems. A fully executable jar can be
453
+ executed like any other executable binary or it can be <<deployment-service,registered
454
+ with `init.d` or `systemd`>>. This makes it very easy to install and manage Spring Boot
455
+ applications in common production environments.
456
+
457
+ WARNING: Fully executable jars work by embedding an extra script at the front of the
458
+ file. Currently, some tools do not accept this format so you may not always be able to
459
+ use this technique. For example, `jar -xf` may silently fail to extract a jar or war that
460
+ has been made fully-executable. It is recommended that you only make your jar or war
461
+ fully executable if you intened to execute it directly, rather than running it with
462
+ `java -jar` or deploying it to a servlet container.
454
463
455
464
To create a '`fully executable`' jar with Maven use the following plugin configuration:
456
465
@@ -465,7 +474,7 @@ To create a '`fully executable`' jar with Maven use the following plugin configu
465
474
</plugin>
466
475
----
467
476
468
- With Gradle, the equivalent configuration would be :
477
+ With Gradle, the equivalent configuration is :
469
478
470
479
[source,groovy,indent=0,subs="verbatim,quotes,attributes"]
471
480
----
@@ -475,19 +484,15 @@ With Gradle, the equivalent configuration would be:
475
484
----
476
485
477
486
You can then run your application by typing `./my-application.jar` (where
478
- `my-application` is the name of your artifact).
487
+ `my-application` is the name of your artifact). The directory containing the
488
+ jar will be used as your application's working directory.
479
489
480
- NOTE: Fully executable jars work by embedding an extra script at the front of the file.
481
- Not all tools currently accept this format so you may not always be able to use this
482
- technique.
483
-
484
- NOTE: The default script supports most Linux distributions and is tested on CentOS and
490
+ [[deployment-install-supported-operating-systems]]
491
+ === Supported operating systems
492
+ The default script supports most Linux distributions and is tested on CentOS and
485
493
Ubuntu. Other platforms, such as OS X and FreeBSD, will require the use of a custom
486
494
`embeddedLaunchScript`.
487
495
488
- NOTE: When a fully executable jar is run, it uses the jar's directory as the working
489
- directory.
490
-
491
496
492
497
493
498
[[deployment-service]]
0 commit comments