Skip to content

Unable to find Java When excute full executable jar #8653

Closed
@ghost

Description

description

I use spring-boot-maven-plugin create a full executable jar ,get the error when excuted the jar。
error:

[root@hostname deploy]# ll
total 41716
-rw-r--r-- 1 root root      158 Mar 17 10:45 sc-server-0.0.1-SNAPSHOT.conf
-rwxr-xr-x 1 root root 42713080 Mar 17 10:54 sc-server-0.0.1-SNAPSHOT.jar
[root@hostname deploy]# ./sc-server-0.0.1-SNAPSHOT.jar 
Unable to find Java

maven configuration

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

jarname.conf

JAVA_HOME=/usr/local/java/jdk1.8.0_05
LOG_FOLDER=/data/sc-server/10031/logs
PID_FOLDER=/data/sc-server/10031/logs
RUN_ARGS=-Dspring.profiles.active=peer1

system

CentOS release 6.6 (Final)
Linux version 2.6.32-504.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Oct 15 04:27:16 UTC 2014

other

I can not decomplile the jar

Activity

wilkinsona

wilkinsona commented on Mar 17, 2017

@wilkinsona
Member

I suspect this is a problem in your environment. You can see what the script that's prepended to that jar file is doing by running it in debug mode:

bash -x sc-server-0.0.1-SNAPSHOT.jar

If you share this output we may be able to help you to figure out what's wrong.

spring-projects-issues

spring-projects-issues commented on Mar 24, 2017

@spring-projects-issues
Collaborator

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues

spring-projects-issues commented on Mar 31, 2017

@spring-projects-issues
Collaborator

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

pagadala15

pagadala15 commented on Nov 28, 2017

@pagadala15

Hi,
Can you please provide a working example that takes myapp.jar and myapp.conf file in the same location so that myapp.jar reads myapp.conf on the startup.
Currently, myapp.jar is ignoring any content in myapp.conf. I couldnt find any proper samples and/or some resolution. Thank you.

regards,
Srinivasulu Pagadala

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @snicoll@wilkinsona@pagadala15@spring-projects-issues

        Issue actions

          Unable to find Java When excute full executable jar · Issue #8653 · spring-projects/spring-boot