0

So I installed Linux on my chromebook, xfce4 I installed openjdk with terminal and also can't execute the file with the terminal or using the GUI. I clicked on properties and permission but there is no Execute the file option. Any help would be appreciated also I can't make the file executable with the terminal.

enter image description here

This shows up in the propertied.

  • Where is the jarfile? In your Downloads folder? – Kaz Wolfe May 8 '17 at 16:54
  • Yep it's in the downloads folder – Anas Rizwan May 8 '17 at 17:11
  • 1
    Also, welcome to Ask Ubuntu! I would highly suggest reading our tour to get a better idea of how our site works (and a free badge). – Kaz Wolfe May 8 '17 at 17:14
3

It seems to me that you're just not in the right folder. Run the following command:

cd ~/Downloads

You'll notice your prompt change to say something linethe following:

anas@localhost:Downloads$

This means that your terminal window is now pointing to your Downloads folder, and you can access files in that folder directly. Now, run your launcher command:

java -jar Minecraft.jar

Minecraft should start right up.


Linux is picky with directory structures in the terminal, especially when it comes to a relative path. For example, assuming you're in your home folder (~):

  • java -jar Minecraft.jar will attempt to launch Minecraft.jar in your current directory (or /home/anas/Minecraft.jar)
  • java -jar Downloads/Minecraft.jar will attempt to launch Minecraft.jar inside the Downloads subdirectory of the current directory (or /home/anas/Downloads/Minecraft.jar)
  • java -jar /home/anas/Downloads/Minecraft.jar will attempt to launch the jarfile at /home/anas/Downloads/Minecraft.jar exactly as written.
  • 1
    I think this solved their problem and they are too busy playing to mark it as correct – ppostma1 May 8 '17 at 20:34
  • Thanks I did what you said and it did launch but this error popped up. Any suggestions? imgur.com/a/DgC34 – Anas Rizwan May 9 '17 at 10:30
  • @ppostma1 Not really, it was night time so I had gotten into bed. – Anas Rizwan May 9 '17 at 10:31
  • I just downloaded the launcher pack Lzma directly from the web. After downloading it the file is in downloads, I tried running minecraft.jar again but it was fail. – Anas Rizwan May 9 '17 at 10:43
0

Look at the following link for more information. Try running this command.

java -jar Minecraft.jar

How can I execute a .jar file from the terminal

You can check your java version with the following.

java -version
You can install java with the following.

sudo apt-get install default-jre
  • It says unable to access jarfile Minecraft.jar I also installed java using the same command – Anas Rizwan May 8 '17 at 16:40
  • Is the .jar file corrupted? – Robby1212 May 8 '17 at 16:45
0

You should create script:

#/bin/bash
java -jar ~/path/minecraft.jar

echo 

And it should work.

0

Have you tried this geek Ubunutu > Minecraft tutorial? https://www.howtogeek.com/198476/how-to-install-minecraft-on-ubuntu-or-any-other-linux-distribution/

Once in the Jar is downloaded, you are supposed to check the box "Allow Executing This File as a Program", which I do not see on your properties box. If that is the case you must cd to the directory the file is in and type chmod u+x Minecraft.jar . This will change the file to be executable. Once it is, you are supposed to be able to double click to launch it.

One common problem is the file doesn't completely download. Make sure the file size is as expected.

A second, configuration only issue, is a security scenario where routines prevent you from changing a downloaded file to be executable. This file must be white-listed first before you can make it executable.

The third issue is a very annoying problem with minecraft: it often refuses to run twice. You have to reboot the computer to play it a second time.

  • 4
    Hello and welcome to Ask Ubuntu. Please refrain from posting link-only answers, as your answer depends solely on the link not vanishing. Please edit your question to include all important parts from your link, and then provide the link as a source. – Kaz Wolfe May 8 '17 at 17:03
  • Thanks, I made the file executable and can launch it by double clicking it. The only problem is this issue do you have any idea? imgur.com/a/DgC34 – Anas Rizwan May 9 '17 at 10:34
0

I missed that you posted a xfce OS question in an Ubuntu forum. The option to make that file executable and run it is not much of an option in that flavor.

Toms Hardware solved this issue, however, the recommended option is to install the package from the repositories to make Minecraft an authenticated software install (and able to run)

sudo add-apt-repository ppa:minecraft-installer-peeps/minecraft-installer
sudo apt-get update 
sudo apt-get install minecraft-installer

More info: http://www.tomshardware.com/answers/id-2296469/unable-run-minecraft-jar-xfce4.html

If you cannot get it to install with the above installation commands, then the commands to precisely execute the jar file is:

cd ~/Downloads
java -jar ./Minecraft.tar
  • The above 3 commands worked except the last one, it says unable to locate package minecraft-installer – Anas Rizwan May 9 '17 at 10:53
  • ok, trying to figure out if this works the same in xfce. Can you go to system settings / Software & updates / Other Software tab and find the section http://ppa.launchpad.net/minecraft-installer-peeps/minecraft-installer/ubuntu ? If you can edit and change that field distribution to 'trusty'. Then run sudo apt-get update and sudo apt-get install minecraft-installer again – ppostma1 May 9 '17 at 14:20
  • Its a configuration issue that is telling the OS that its not configured to run on your version (but it just needs that minor change) – ppostma1 May 9 '17 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.