Setlog just released its first open-source project. It is a combined installer, updater and launcher named trivrost, which, among other things, can act a Java Web Start alternative. This is the first in a series of articles about it.
Originally, we wanted to call the project Bifröst, which, in norse mythology, is a “rainbow bridge” connecting the realm of the gods Asgard (your web server) with the earthly realm Midgard (the users’ computers). So why did we choose trivrost? Because the software is doing three things: installing, updating and launching an application. In addition, it is running on the three major operating systems: Windows, macOS and Linux.
Problems require solutions
The desktop client of our application OSCA was launched with a tool called Java Web Start. This tool was installed (by an admin) on the computer of every user of our application. The user could double-click on a jnlpfile to launch OSCA. This file contained all the information Java Web Start needed to install, update and launch the application. Our software developers didn’t need to implement any source code to do that, so they could focus on the business logic.
Unfortunately, Oracle stopped to support Java Web Start. Furthermore, it is now ill-advised to install Java system-wide. Instead, applications should ship with a copy of an appropriate Java Runtime Environment contained inside.
Therefore, we had to look for another solution. We found several, but none of them solved all our problems.
A tool named getdown seemed very promising. The developers of this tool were unsatisfied with Java Web Start’s ability to ship their Java-based video games, so they developed getdown. The problem was that getdown itself was written in Java. This was fine back when it was developed, since the users had installed Java on their machines. But nowadays Java applications should not depend on a pre-installed version of Java, so getdown wasn’t an option for us.
There are several projects to bundle a Java application with a Java Runtime Environment. Sadly, none of them solve the problem of installing and updating an application. However, there will be an open-source successor of Java Web Start called OpenWebStart. Unfortunately, this software is still in alpha state and became available only after we had started to tackle the problem by ourselves.
So we implemented a launcher from scratch. The core requirements were:
We managed to implement a first prototype within a day. However, it lasted a year until the tool was polished and ready to use.
Our original goal was to develop an alternative to Java Web Start. But we managed to build a more general solution, that could install, update and launch an application regardless of the language it was written in. If necessary our tool can ship the runtime environment or libraries needed.
trivrost is open-source software. It is licensed under the MIT License. You are welcome to take a look at our GitHub Repository. We are happy about feedback, bugreports and pull requests. We are even more happy if you consider using trivrost or tell others about this cool project.