Thursday, April 18, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 3735  / 1 Year ago, wed, january 4, 2023, 3:34:23

I use this command in the terminal to run the minecraft launcher with java 8:



/home/max/Java/jre1.8.0_25/bin/java -jar Minecraft.jar


I included the full java path because I installed it on /home as a normal user and i want to include it.



That command works, it opens the launcher with Java 8 but I want to make a bash file so I don't have to open the terminal. And, most important, I don't want the terminal to remain open when I click play in the Minecraft launcher and the game starts.



Now if i close manually the terminal when the game have started, the game is closed too.


More From » command-line

 Answers
5

If you are using linux you probably like to see different ways of "living".
I suggest you the hard way:




  1. open a terminal (I can not survive with less than 3 terminals opened) and keep it opened! And learn how to do everything with commands.

  2. create a ~/bin directory for your commands (mkdir ~/bin)

  3. add ~/bin the PATH

  4. create a command named minecraft (using @Sudheer, using an editor or by



    echo -e '#!/bin/bash'
    /home/max/Java/jre1.8.0_25/bin/java -jar Minecraft.jar' > ~/bin/minecraft
    chmod 755 ~/bin/minecraft

  5. instead of clicking, just write minecraft in your terminal.



[#21927] Thursday, January 5, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mentpengu

Total Points: 148
Total Questions: 114
Total Answers: 119

Location: Anguilla
Member since Sun, Aug 7, 2022
2 Years ago
;