Spring Boot PropertiesLauncher and external JARs

A sample application with some run-scripts at github shows you different approaches.

2 thoughts on “Spring Boot PropertiesLauncher and external JARs

  1. Hi, I am developer and I see your repository spring-boot-propertieslauncher-and-external-jars

    I am stuck on a problem since days and I would like to ask you a question.

    When I executing:

    java -Dloader.path=./target/spring-boot-loader-2.1.4.RELEASE.jar -jar quartz_subs.jar

    I obtain the error: “Could not find or load main class org.springframework.boot.loader.PropertiesLauncher”

    My pom:

    11
    org.mandint.quartzsubscriptions
    QuartzSubscriptionsApplication

    org.springframework.boot
    spring-boot-loader
    2.1.4.RELEASE

    quartz_subs

    org.springframework.boot
    spring-boot-maven-plugin

    true
    ZIP

    repackage

    Any suggestion would be very appreciated.

    Francesco De Rose

    Reply
    • I updated the example for Spring 2.1.4. It still works. See the readme file for the expected output.

      Your command line `java -Dloader.path=./target/spring-boot-loader-2.1.4.RELEASE.jar -jar quartz_subs.jar` looks wrong to me.
      spring-boot-loader is not to be loaded manually. You package your app using spring boot and the result is an UEBER-JAR, which includes the Spring dependencies and the MANIFEST.MF for the JAR. You put your external dependency into the loader path

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s