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.

Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172

5 Answers5

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.
Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172
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
Robby1212
  • 880
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.

ppostma1
  • 113
  • 1
  • 7
  • 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 08 '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? http://imgur.com/a/DgC34 – Anas Rizwan May 09 '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
ppostma1
  • 113
  • 1
  • 7
  • The above 3 commands worked except the last one, it says unable to locate package minecraft-installer – Anas Rizwan May 09 '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 09 '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 09 '17 at 14:21