06 Jul 2014, 02:34
Generic-user-small

Noah David (4 posts)

how come the book says that the start_minecraft script should be java -Xmx1024M -jar craftbukkit.jar but the script is

!/bin/bash

cd “$( dirname “$0” )”

java -Xms1024M -Xmx1024M -jar craftbukkit.jar

and when i tried doing just this

java -Xmx1024M -jar craftbukkit.jar

it did not work it said sh: ./start_minecraft: not found and when i tried

java -Xms1024M -jar craftbukkit.jar

i also got sh: ./start_minecraft1: not found but how come when i did

!/bin/bash

java -Xms1024M -jar craftbukkit.jar

it worked

06 Jul 2014, 02:33
Generic-user-small

Noah David (4 posts)

the !/bin/bash was not supposed to be big and it was supposed to say #!/bin/bash

07 Jul 2014, 18:29
Andy-talking_pragsmall

Andrew Hunt (179 posts)

The extra argument (-Xms1024M) just sets the stack size, it has nothing to do with the shell script being found or not found.

If you’re getting:

sh: ./start_minecraft not found

Then I’m guessing there’s either a typo there (“start_minecraft” not spelled correctly), or the file needs to be marked executable.

/\ndy

27 Jul 2014, 16:14
Generic-user-small

Darrell Bennington (2 posts)

FYI - I had the same issue with the shell script not being found on OS X, and it turns out that the script isn’t created when you first run the craftbukkit server. I’m assuming this used to happen with the version available of bukkit when the book was written, but it doesn’t now with the latest version.

The file can be created manually with the instructions at http://wiki.bukkit.org/Setting_up_a_server.

27 Jul 2014, 16:49
Andy-talking_pragsmall

Andrew Hunt (179 posts)

No, that’s not a Bukkit script – it’s one I provide with the book. You need to copy it into the server directory. See pg 25 for details.

/\ndy

08 Jan 2015, 13:37
David-g-johnson-grow-the-dream-600x600_pragsmall

David Johnson (5 posts)

Hi Andy,

My daughter and I are using the 2nd edition (CanaryMod) of the book, and encountered the need for the “start_minecraft” script on page 24.

I can’t seem to find where I should be looking for this script. Did i miss something completely obvious somewhere? (If so… my apologies!)

David

08 Jan 2015, 14:37
Andy-talking_pragsmall

Andrew Hunt (179 posts)

Yes, completely obvious: it’s a script that comes with the book. It says right on that page:

The example code for this book contains a subdirectory named runtime. In the runtime directory you’ll see a startup script named start_minecraft. Copy it to your server directory 

Does it not say that in your copy?

/\ndy

12 Jan 2015, 14:00
David-g-johnson-grow-the-dream-600x600_pragsmall

David Johnson (5 posts)

Hi Andy,

Yes. We found that line. Unfortunately (and again – maybe I’m just missing something obvious), I don’t know where to find the example code for the book. I see that you said it comes with the book… are we supposed to download it from somewhere? We bought the book on Amazon and received only the book.

We’re running across another reference on Page 32 that says, “I’ve also got a complete plugin all set up for you in the HelloWorld directory in the code for this book, which you downloaded to the Desktop/code/HelloWorld.”

I’ve searched all the previous content and the book and I’m gonna feel pretty stupid if it’s clearly spelled out somewhere about how/where to download the code!

Thanks!

David

12 Jan 2015, 18:12
Andy-talking_pragsmall

Andrew Hunt (179 posts)

page xiv and page 5 both ask you to download the source code.

/\ndy

13 Jan 2015, 13:49
David-g-johnson-grow-the-dream-600x600_pragsmall

David Johnson (5 posts)

So… I was missing something obvious! (Well… I guess obviousness could be debated somewhat…)

We honestly searched high and low for something that would have told us where to find the example code once we ran across a reference to it.

Sorry to bug you! …but thanks for the help!!

  You must be logged in to comment