Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡ Cannot make jar executable (cannot execute binary file: Exec format error) #14

Closed
adriens opened this issue Dec 21, 2022 · 8 comments
Assignees
Labels
enhancement New feature or request RUN Toute activité liée au maintient en conditions opérationnelles, bugs,...

Comments

@adriens
Copy link
Member

adriens commented Dec 21, 2022

❔ Context

I need to make the jar executable but I cannot achieve this.

Here are the steps to reproduce :

export J7ZIP_VERSION=v1.0.0
curl -LO https://github.com/opt-nc/j7zip/releases/download/$J7ZIP_VERSION/j7zip.jar
chmod +x j7zip.jar
./j7zip.jar
java -jar j7zip.jar

image

🎯 Action

Please let me know what should be done to make it possible to run the jar without having to call java -jar... or if not possible provide a j7zip.sh in the repo that I could make executable.

@adriens adriens added RUN Toute activité liée au maintient en conditions opérationnelles, bugs,... enhancement New feature or request labels Dec 21, 2022
@adriens adriens self-assigned this Dec 21, 2022
@adriens
Copy link
Member Author

adriens commented Dec 21, 2022

I'm preparing a dumb .sh that does the job

@Dougniel
Copy link
Member

Maybe I didn't understand you request, but a JAR cannot be executed directly without java

@adriens
Copy link
Member Author

adriens commented Dec 21, 2022

I meant the following thing(assuming we have a java runtime properly set)

chmod u+x hello.jar
./hello.jar

ℹ️ Sometimes we use it on Spring Boot

@Dougniel
Copy link
Member

I meant the following thing(assuming we have a java runtime properly set)

The purpose of this documentation is to explain how to make an executable JAR versus a lib JAR (with MANIFEST.MF)

ℹ️ Sometimes we use it on Spring Boot

Never seen that before, you need `java -jar ..'. Do you have some example ?

@adriens
Copy link
Member Author

adriens commented Dec 23, 2022

@Dougniel
Copy link
Member

@adriens
Copy link
Member Author

adriens commented Dec 26, 2022

We'll talk about this at our SCRUM this afternoon.

@adriens
Copy link
Member Author

adriens commented Jan 4, 2023

As discuused today. Abandonned because too much OS specfic

@adriens adriens closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request RUN Toute activité liée au maintient en conditions opérationnelles, bugs,...
Projects
None yet
Development

No branches or pull requests

2 participants