Posts: 1
Joined: Sun Oct 13, 2019 3:43 pm

Having trouble with .Jar files

Sun Oct 13, 2019 3:48 pm

Forgive me for being very technically inclined here, but I'm trying to open a normal .jar file in my Pi and I need to choose an application to open it with. What am I supposed to search for in the choose application thingy?

User avatar
Posts: 6085
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Having trouble with .Jar files

Mon Oct 14, 2019 12:44 pm

java ;)

If you want to "run" the file that is.. if you want to inspect the content then maybe some "archive" program does the task.

Its probably not the ideal way to start .jar files in many cases. Most of the time you probably want to add some parameters to the "java" program.
So I think its pretty common to create a small shell-script and then click on that when you want to start the program.

Posts: 489
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: Having trouble with .Jar files

Mon Oct 14, 2019 2:24 pm

Assuming it is a Java program in that .jar file you are trying to run, the easiest thing it to start it from the command line:

java -jar nameOfYourJarFile.jar

If you want to run it by double clicking on its icon in File Manager:

Open the File Manager, right click on the file you want to run, AnalogClock.jar, select Open With..., in the Choose Application dialog click the Custom Command Line tab, put: java -jar %f in the Command line to execute: box, and set the Application name. Now you can double click the icon in File Manager and run the program.
filemanager.png (98.5 KiB) Viewed 1783 times
choose.png (49.99 KiB) Viewed 1783 times

Return to “Java”