This very useful build.sh
script allow you to build any java project with
the maven inspired file structure below. It is particularly adapeted to
very light machine : ARM archtecture based ones a.k.a. RaspberryPi, OrangePi,
BananaPi, etc ...
It is using only bash
, javac
, java
,jar
and git
command line instructions.
${projectfolder}/
|_ lib
| |_ options.sh
| |_ stub.sh
|_ src
| |_ main
| |_ java
| | |_ my
| | |_ program
| | |_ package
| | |_ MyMainClass.java
| |_ resources
| |_ res
| | |_ images
| | | |_ mylogo.png
| | |_ game.properties
|_ .gitignore
|_ README.md
|_ build.sh
(|_ pom.xml)
The first variables must be adapted to your needs:
PROGRAM_NAME
Your program name,PROGRAM_VERSION
The version of your program,MAINCLASS
canonical name of your JAR entry point class,VENDOR_NAME
the vendor for this program,AUTHOR_NAME
the author of this program.
The manifest is generated by the buils.sh
script.
McG.
Thanks to https://github.com/maynooth/CS210/wiki/Convert-Java-Executable-to-Linux-Executable for creating a linux executable with concatenated sh and jar file.