You are not logged in.

#1 2016-10-08 03:14:18

ahnkoon
Member
Registered: 2016-10-08
Posts: 4

[SOLVED] what's the command to excute Minecraft.jar?

Hello, Archlinux users. Have a good long weekend.

Honestly, I'm not a programmer, so I don't know how the headless java archive file works in terminal command. It actually works in Thunar with double-clicking though, I tried "java -jar Minecraft.jar" to make excutive file with cute icon, and it doesn't work with 'headless' issue. Of course, I had installed official Oracle jre. Could you help me please?

Last edited by ahnkoon (2016-10-10 03:27:18)

Offline

#2 2016-10-08 06:33:13

Ziusudra
Member
Registered: 2014-04-19
Posts: 120

Re: [SOLVED] what's the command to excute Minecraft.jar?

If you installed Minecraft from the AUR then there should be a script @ /usr/bin/minecraft.

When you say "headless" do you mean a minecraft server? If you installed minecraft-server from the AUR then there should be /usr/bin/minecraftd

If you didn't install either from the AUR then you should.

Offline

#3 2016-10-08 15:32:19

promarbler14
Member
From: MD, U.S.
Registered: 2016-03-28
Posts: 40

Re: [SOLVED] what's the command to excute Minecraft.jar?

My only guess would be to install xrandr, if it hasn't already been installed. There's really no need to install Minecraft from the AUR (?!), as it's just a simple jar file that you can download straight from their website.

Offline

#4 2016-10-08 16:51:04

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,863
Website

Re: [SOLVED] what's the command to excute Minecraft.jar?

Please don't make nonsensical guesses, promarbler14. Installing xrandr has nothing to do with running minecraft.

Also, although installing the AUR package isn't essential, it is still recommended over your latter suggestion, if only because of the wrapper script Ziusudra mentioned (it also provides a .desktop file for xdg menus).


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2016-10-09 14:46:04

ahnkoon
Member
Registered: 2016-10-08
Posts: 4

Re: [SOLVED] what's the command to excute Minecraft.jar?

Well, Thanks everyone! I also thought AUR's Minecraft, and I installed and put $minecraft in terminal, it however doesn't work with the same issue. The thing is that it actually works in Thunar, or other GUI file managers!

I'm just wondering why it does work with double-clicking minecraft.jar file, but it does NOT work in terminal with $java -jar minecraft.jar command.

Offline

#6 2016-10-09 15:12:44

promarbler14
Member
From: MD, U.S.
Registered: 2016-03-28
Posts: 40

Re: [SOLVED] what's the command to excute Minecraft.jar?

Surprisingly, Minecraft (specifically the LWJGL library it uses) requires the xrandr binary to be installed, apparently to obtain the display modes. I should have explained myself, sorry. However, it seems that this is likely not the cause in this case, re-reading the original post.

By "'headless' issue", what is the message that appears? Is the message from the JVM (a HeadlessException)? If so, what is the terminal you are trying to run minecraft.jar within?

Offline

#7 2016-10-09 22:37:11

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: [SOLVED] what's the command to excute Minecraft.jar?

Thunar and other filemanagers probably have a default association for jar-files, see https://wiki.archlinux.org/index.php/De … plications .

You are running the java from the directory where the jar is , right?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#8 2016-10-10 03:14:03

ahnkoon
Member
Registered: 2016-10-08
Posts: 4

Re: [SOLVED] what's the command to excute Minecraft.jar?

Lone_Wolf wrote:

Thunar and other filemanagers probably have a default association for jar-files, see https://wiki.archlinux.org/index.php/De … plications .

You are running the java from the directory where the jar is , right?

Now I can see the light! Appriciate to your help.

Have a wonderful weekend everyone.

Offline

#9 2016-10-10 03:26:51

ahnkoon
Member
Registered: 2016-10-08
Posts: 4

Re: [SOLVED] what's the command to excute Minecraft.jar?

I solved this to excute the actual binary file in "/usr/lib/jvm/java-8-jre/jre/bin/java" instead running just "java" in the terminal.

Offline

#10 2016-10-10 04:48:48

basica
Member
From: Australia
Registered: 2012-10-31
Posts: 217

Re: [SOLVED] what's the command to excute Minecraft.jar?

Sounds like java wasn't in your PATH. if you run

echo $PATH

and you don't see something like the following in it

/usr/lib/jvm/java-8-jre/jre/bin

That'll explain it. You can save yourself typing all that out by adding it to your PATH.

Offline

#11 2016-10-10 05:40:24

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] what's the command to excute Minecraft.jar?

If you installed java via pacman, then `readlink -e /usr/bin/java` should resolve to "/usr/lib/jvm/java-8-openjdk/jre/bin/java" or similar.

I don't see a java-8-jre option in the repos, though. Is it from the AUR?
You can select your default java using the `archlinux-java` command, it sounds like your java installation may be broken somehow...


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#12 2016-10-14 01:41:14

Ziusudra
Member
Registered: 2014-04-19
Posts: 120

Re: [SOLVED] what's the command to excute Minecraft.jar?

promarbler14 wrote:

My only guess would be to install xrandr, if it hasn't already been installed. There's really no need to install Minecraft from the AUR (?!), as it's just a simple jar file that you can download straight from their website.

I'd say dependencies is a good reason to install from the AUR. Guess what the PKGBUILD for minecraft lists as one of its dependencies - xrandr. So, if that had been the problem, installing MC from the AUR would have fixed it.

Offline

#13 2016-10-18 13:18:30

dillebidum
Member
Registered: 2016-09-21
Posts: 19

Re: [SOLVED] what's the command to excute Minecraft.jar?

I'd recommend the package from the AUR, not only for the reason above, but also because of /usr/bin/minecraft and minecraft.desktop.
The below commands (which are documented, read the comments) will probably help you.

sudo pacman -R <java-env-pkg> # removes your (probably broken) java env.
sudo pacman -Sc # optional, removes pacman's cache of packages previously installed, helps if it was broken since install time
sudo pacman -S <java-env-pkg> # installs your java env.
archlinux-java status # lists your jvms, pick one. tip: oracle's jvm works better but is non-free
sudo archlinux-java set <preferred-java-env> # sets your default java env.
exit # obviously, exits the terminal

And...

Eschwartz wrote:

I don't see a java-8-jre option in the repos, though. Is it from the AUR?

Yes.

basica wrote:

You can save yourself typing all that out by adding it to your PATH.

You shouldn't add it to your PATH manually. The wiki page says you should use

archlinux-java

instead. Don't add it to JAVA_HOME either, as that's worse.

Last edited by dillebidum (2016-10-19 17:18:35)


A normal Arch user. A KISS lover. YouTube-in-files downloader. Hater of 32-bit binaries. Power user of virtual machines.
If that isn't enough for you, look here.

Offline

Board footer

Powered by FluxBB