A simple installation routine for your Java application
Go to file
Jonas Letzbor 3d63f17ca1
Gitea/Java-Installer/pipeline/head This commit looks good Details
Return positive response codes instead of negative ones and write errors to System.err
2023-05-07 18:05:05 +02:00
gradle/wrapper Rename domain name and update gradle 2022-04-02 10:01:11 +02:00
src/main Return positive response codes instead of negative ones and write errors to System.err 2023-05-07 18:05:05 +02:00
.gitignore [Windows] Fix path entry when > 1024 2023-01-31 19:59:38 +01:00
.project Add jenkinsfile 2023-01-06 18:01:04 +01:00
Jenkinsfile Add jenkinsfile 2023-01-06 18:01:04 +01:00
LICENSE Change license from GPLv3 to AGPLv3 2022-05-12 17:43:14 +02:00
README.md Translation support and publication to local maven repository 2022-04-03 15:12:24 +02:00
build.gradle Fix creation of program dirs + add not kill program option 2023-04-01 10:34:40 +02:00
gradlew Rename domain name and update gradle 2022-04-02 10:01:11 +02:00
gradlew.bat Rename domain name and update gradle 2022-04-02 10:01:11 +02:00
settings.gradle Rename domain name and update gradle 2022-04-02 10:01:11 +02:00

README.md

Purpose

This project provides a simple installation tool for installing your java application under the operation systems windows and linux.

If you want to use a simple installer instead of the installation method the operating systems ships with (like msi or dpkg packages) feel free to use this installer.
This installer can be used for a single jar file with a few dependencies.

Features

Windows and Linux

  • quiet installation without opening a command prompt
  • installation of fonts from the source folder (.tft)
  • the executable to install can be downloaded from a webserver.
    Basic auth for downloading the executable is supported
  • install the program portable in a single folder
  • creating a desktop and a start menu entry with a custom icon
  • a launch script for opening the application will be provided

Windows

  • besides the removal via the launch script an uninstall entry in the contol center will also be created
  • install the programm only for the current user -> no need of administrator rights

Linux

  • creation of a systemd unit file to run the program as a service

Getting started

The usage of the library is very simple. See the below code snippet for a short example.

InstallConfig conf = new InstallConfig (
    "myCompany", 
    "2.0.0", 
    "MyApplicationName", 
    "My long application name")
;
// now you can specify the various options via the InstallConfig
conf.setDownloadURLForProgramm(URL, BASIC_AUTH_USER, BASIC_AUTH_PASSWORD);
...   // see the javadoc for more options

// after configuring you can install the application
Installer installer = new Installer(conf);
installer.installProgramm(args);

// whether the installation was successful (0) or erroneous (<0)
System.out.println(installer.getResponseCode());

For a real life example you can take a look at the installer of RPdb.

License

This project is licensed under the GPLv3. Please see the LICENSE file for an full license.

Need help?

You can check out the 📖 Javadocs for more informations.

If that didn't help you feel free to create an issue or open a pull request 📣