Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to deliver java software on Linux?

Tags:

java

linux

I'm having a Java project which is cross-platform. For Windows and Mac OS X I deliver .EXE or .APP files generated by "launch4j" and "jarbundler" via an ANT task.

Now I'm searching for a way to deliver this piece of software to Linux users, too. At the moment, all I have is a runnable JAR.

Is there a better way than delivering a runnable JAR packed as .tar.gz? Probably an easy way where the executable shows the programs icon (which a runnable JAR can't)?

like image 896
ToFi Avatar asked Nov 04 '22 07:11

ToFi


1 Answers

Just create a menu shortcut, though a .desktop file similar to this:

[Desktop Entry]
Categories=Games
Exec=java -jar YOURJARFILE.jar
Icon=YOURICON.png
Name=Application Name
Type=Application

(full specs on http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec)

Then install it using:

xdg-desktop-menu install YOURAPP.desktop

like image 65
Gheesh Avatar answered Nov 10 '22 16:11

Gheesh