Bot dont start Local Java


Hello every one,

i cant start the Bot on my Local Machine.
If i start the run…bat i get this error Message

Turn 1

error: failed to decode bot message: “a” (at position 2)
Last input received was:
at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at Source)

at Source)

at$100(Unknown Source)

at$ Source)

at$ Source)

at Method)

at Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

Error: A JNI error has occurred, please check your installation and try again

Exception in thread “main”

Thx for Help


It looks like Java can’t start the bot. Are you able to run java MyBot in the console from that directory?


I have a similar Problem:

Turn 1
error: timed out after 2000 ms (when reading string)
Last input received was:

console output:


@Janphr same question: does java MyBot work?


not sure, how do i check it? if i run it in IDE it waits for the input.
my python version works just fine.


Just try running java MyBot instead of ./run_game.bat.


same as in IDE


Hmm, that is right. Perhaps edit run_game.bat to use java -cp . MyBot instead of java MyBot (or, if you’re running halite.exe directly, make the same change).


finally got it, these are all the changes i made:

javac -sourcepath G:\Dropbox\Java\workspace\halite\src
G:\Dropbox\Java\workspace\halite\src\halite.exe --replay-directory replays/ -vvv --width 32 --height 32 "java -cp . MyBot" "java -cp . MyBot"

biggest problem for most might be, that there is no space between and halite.exe in the original bat file -> MyBot.javahalite.exe. you might wanna edit that.
rest are probably local environment problems…but it works like this for me now.
thanks for your help