1
votes

I create fully executable jar by spring-boot-maven-plugin(v1.3.6) this way:

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <executable>true</executable>
    </configuration>
</plugin>

When I start result jar like executable (like "./app.jar", not via "java -jar app.jar"), from target directory - the app is correctly starts and works, but if I copy this jar to another directory - I get error: "Invalid or corrupt jar file /home/user/Spring". (I use Linux Mint OS, if this important)

When I start it by "java -jar" command - it works properly in any directory.

How can i copy spring-boot executable jar correctly?

1
What is the exact location of the jar file when you get the message "Invalid or corrupt jar file /home/user/Spring"?James Jithin
The problem was in the "space" symbol in the directory name. Thanks you helped.RocketBoom

1 Answers

2
votes

Solved. The problem was in the "space" symbol in the directory name.