-1

I am a COMPLETELY new user to linux and have been using most of my programs through wine. Take for example this program : http://www.atlauncher.com/download/jar/ which, when unpacked has no executable files. I'm not sure if I am looking for the wrong type of file but I would really appreciate some help on how to get downloads like this with no obvious runnable files up and running.

Thanks in advance

2

2 Answers 2

1

You don't extract .jar files, because they are Java Archives and should therefore be executed using Java (or in case of a library included in your project). Ubuntu opens .jar using the Archive Manager by default because it is actually a ZIP file.

So you should install Java first. If you haven't already, you can execute the following commands to install OpenJDK (an open source version of Java):

sudo apt-get update
sudo apt-get install openjdk-7-jre

Now you can open the .jar file using java -jar file.jar in the terminal or by double clicking it in your file manager.

2
  • Thanks so much and now I have the option to open with java but when I do it returns the message :The file '/home/matthew/Desktop/ATLauncher.jar' is not marked as executable. ------ Oops a similar question quickly helped me solve this. Thanks so much!
    – Matthew
    May 2, 2014 at 22:56
  • Right click the file, click Properties, click Permissions, check Allow executing file as program. You can also use chmod +x file.jar in a terminal which will do the same thing. May 2, 2014 at 22:58
1

That particular file you have downloaded is a Java file; by default, Linux, will not grant executable rights to files - you need to grant that privilege.

Quick answer

A) You need Java (unless you have that):

sudo apt-get install openjdk-7-jre

B) You'll need to correct the permissions:

cd ~/Downloads/
chmod +x <file>.jar

C) To run: java -jar <file>

Not the answer you're looking for? Browse other questions tagged .