Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have a directory, with a small scructure:

The do some checks, and start program.jar with a lot of parameters.

There's a way to encapsulate all this structure in a single file (like the executables in OSX), and made this file a executable?

share|improve this question
You mean an installer? Or something that contains everything in binary form and can be run directly? Both are possible but the second can't be answered here. It will involve you turning it into a program in your favorite language and including the data in the resulting binary. – terdon May 13 '14 at 14:22
Thanks @terdon. What I want is the second option: a container to run directly (like the structure in OSX). Maybe I need to rewrite the app to accomplish the objective. Thank you. – Rodrigo de Avila May 13 '14 at 14:41

1 Answer 1

up vote 1 down vote accepted

No, you can not run a single executable and have your program work without being unpacked. The reason is that your program would expect to be able to access its files using standard syscalls, and if you have those files packed inside an archive, they will not be visible to Linux.

What you can do is use makeself to make a single self-extractable executable archive. Then your user would run the executable, it would extract the files from the archive, and then the user can run the installed program.

Another alternative, since you are using Java, is to pack files inside the .jar archive, and restructure your code. Then you could distribute the single .jar file and the user run it with java -jar.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.