23 Aug 2014, 17:34
Generic-user-small

Ian Ross (4 posts)

Totally new to Java and POSIX - hopefully this is an easy one…

I have fought my way to page 25 of the paperback edition where I had to run the start_minecraft batch file. It didn’t work, telling me there was a syntax error. I have scrutinised my command but I can see no difference between it and the command printed in the book.

As you can see from the listing from POSIX below (renamed sh.exe) I am in the server folder, the server folder has a file called start_minecraft.bat in it and (as far as I can tell) there are no typos. If I use ./start_minecraft.bat I get a ‘not found’ error.

Please help, it’s taken two days to get this far and I think my son is losing interest.

Thanks

POSIX listing: ~/Desktop/Programming/server $ ls Original Jars help.yml start_minecraft.bat banned-ips.txt ops.txt white-list.txt banned-players.txt permissions.yml world bukkit.jar plugins world_nether bukkit.yml server.log world_the_end craftbukkit.jar server.properties ~/Desktop/Programming/server $ ./start_minecraft The syntax of the command is incorrect. ~/Desktop/Programming/server $

23 Aug 2014, 18:12
Andy-talking_pragsmall

Andrew Hunt (210 posts)

Hey Ian,

I don’t think you want start_minecraft.bat, that’s designed to be called from MSDOS. You want the start_minecraft file, which should look something like this:

#!/bin/bash
cd "$( dirname "$0" )"
java -Xms1024M -Xmx1024M -jar craftbukkit.jar nogui

If you’re still having problems, just run Java directly from the server directory, and type in:

$ java -Xms1024M -Xmx1024M -jar craftbukkit.jar nogui

/\ndy

24 Aug 2014, 11:04
Generic-user-small

Ian Ross (4 posts)

Hi Andy,

Thanks for responding so promptly (and on a bank holiday weekend - at least here in the UK).

It worked. I copied the start_minecraft file that did not have an extension over from the runtime folder and ran it from the POSIX shell as directed in the book.

It did however report two warnings (see below). Should I be concerned?

Thanks

Warnings: [WARNING] Failed to load operators list: java.io.FileNotFoundException: .\ops.txt (The system cannot find the file specified) 11:51:41 [WARNING] Failed to load white-list: java.io.FileNotFoundException: .\w hite-list.txt (The system cannot find the file specified)

Full listing produced by running start_minecraft: ~/Desktop/Programming/server $ ./start_minecraft 11:51:41 [INFO] Starting minecraft server version 1.6.4 11:51:41 [INFO] Loading properties 11:51:41 [WARNING] server.properties does not exist 11:51:41 [INFO] Generating new properties file 11:51:41 [INFO] Default game type: SURVIVAL 11:51:41 [INFO] Generating keypair 11:51:41 [INFO] Starting Minecraft server on *:25565 11:51:41 [INFO] This server is running CraftBukkit version git-Bukkit-1.6.4-R2.0 -b2918jnks (MC: 1.6.4) (Implementing API version 1.6.4-R2.0) 11:51:41 [WARNING] Failed to load operators list: java.io.FileNotFoundException: .\ops.txt (The system cannot find the file specified) 11:51:41 [WARNING] Failed to load white-list: java.io.FileNotFoundException: .\w hite-list.txt (The system cannot find the file specified) 11:51:41 [INFO] Preparing level “world” 11:51:41 [INFO] Preparing start region for level 0 (Seed: -3428979976587000091) 11:51:42 [INFO] Preparing spawn area: 11% 11:51:43 [INFO] Preparing spawn area: 31% 11:51:44 [INFO] Preparing spawn area: 52% 11:51:45 [INFO] Preparing spawn area: 73% 11:51:46 [INFO] Preparing spawn area: 89% 11:51:47 [INFO] Preparing start region for level 1 (Seed: -3428979976587000091) 11:51:48 [INFO] Preparing spawn area: 22% 11:51:49 [INFO] Preparing spawn area: 38% 11:51:50 [INFO] Preparing spawn area: 63% 11:51:51 [INFO] Preparing spawn area: 83% 11:51:52 [INFO] Preparing spawn area: 99% 11:51:52 [INFO] Preparing start region for level 2 (Seed: -3428979976587000091) 11:51:53 [INFO] Preparing spawn area: 54% 11:51:54 [INFO] Done (12.925s)! For help, type “help” or “?”

24 Aug 2014, 11:17
Generic-user-small

Ian Ross (4 posts)

Just noticed another warning: 11:51:41 [WARNING] server.properties does not exist

24 Aug 2014, 11:43
Generic-user-small

Ian Ross (4 posts)

Hi Andy,

This may or may not be relevant. I am now at the section where I am trying to connect to the new, local server on my PC. I am getting “Pinging…” as the text under the server name in the Play Multiplayer screen. There is also a red cross on the right hand side which displays the message “(no connection)” when I hover over it. At the same time the POSIX/sh.exe shell is saying “lost connection”. Each time I cancel, return to the Minecraft opening screen and try again, by clicking the Multiplayer button, another line saying “lost connection” appears in the shell display.

If this is an unrelated issue I can start another thread.

Thanks

24 Aug 2014, 14:40
Andy-talking_pragsmall

Andrew Hunt (210 posts)

No worries on the error messages; that’s just the Bukkit server creating files it needs that aren’t there yet.

As to the lost connection, pgs 28-29 talk about that:

“If you get disconnected right away, you may have a version mismatch; see Minecraft Versions, on page 28 for help.”

You need to select the correct version in your client to match the server.

/\ndy

  You must be logged in to comment