You can less
your jar file and will find the following:
#!/bin/bash
#
# . ____ _ __ _ _
# /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
# ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
# \\/ ___)| |_)| | | | | || (_| | ) ) ) )
# ' |____| .__|_| |_|_| |_\__, | / / / /
# =========|_|==============|___/=/_/_/_/
# :: Spring Boot Startup Script ::
#
That is, it's a bash file follow a jar, not a normal jar.
you can extract this file use : unzip spring-boot-foo-0.0.1-SNAPSHOT.jar
or set the executable flag of spring-boot-maven-plugin to false to make a normal jar file.
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>false</executable>
</configuration>
</plugin>
unzip
could extract it. butunizp
could extract all jar file, not only spring boot executable jar.Error: central directory not found.
unzip boot.jar
that you don't like?