How to install JAR file in Ubuntu

Java programs are commonly distributed online as Jar files. This is a file with a .jar extension.

Running a JAR file is straightforward:

$ java -jar foo.jar

But what if I want to have this program appear in my Dash, like other programs? Here is how I usually solve this:

  • I place the JAR file in a ~/bin directory in my home directory.

  • I add the invocation to run the JAR file as a menu item using the Main Menu tool. After it is added, it will appear in Dash when searched by its name.

Do note that the tilde symbol does not work, you will need to provide the full path.

Tried with: Alacarte 3.10.0 and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.