Help Starting Minecraft Server Ubuntu 14.04

My .sh file to launch the server is not working. I have the file named 'craftbukkit.sh' with this pasted in it (from the bukkit set up wiki)

#!/bin/sh
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "$BINDIR"
java -Xmx1024M -jar craftbukkit.jar -o true

and i downloaded the latest version of bukkit and named it 'craftbukkit.jar' and put it in the same directory as the .sh file. i right clicked and allowed executing file as program. under file manager, execute text files is set to ask each time. i click the .sh file and tell it to open in the terminal. the terminal opens and closes real quick each time. i also have java RE 7 downloaded from the software ceneter.

any ideas? i have hosted minecraft servers on older versions before and never had difficulties to the point of having to post online. thanks.

2

2 Answers

The second and third lines of your script are unnecessary. Your script should look like this:

#!/bin/sh
java -Xmx1024M -jar craftbukkit.jar -o true

Here's a breakdown of what each line of the script does:

#!/bin/sh

This line causes your script to be invoked by /bin/sh, which is (in the case) the bash shell

java -Xmx1024M -jar craftbukkit.jar -o true

This line actually starts the server (craftbukkit.jar must be in the same directory.

-Xmx1024M sets the maximum amount of memory available to the process to 1GB, or 1024 MB. If you get an OutOfMemoryError, you'll need to increase this.

I think it is because you installed Bukkit and not Craftbukkit. Here you have a link to download craftbukkit:

CraftBukkit does not work to download on bukkit.org. It just shows an error: It worked for me.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like