for debugging purposes i have a lot of string concatenations with the + operator in my bot. running natively it works like a charm, when i try to run it in the HackJVM i get this Exception:
Could the String concats be the Problem? Perhaps a String Builder is used implicitly for that? I don't use a String Builder anywhere explicitly in my code.08.11.2010 12:11:09 ojvm.machine.ControlUnit makeAndThrow
INFO: new exception: java.lang.LinkageError, msg: File java\lang\StringBuilder.class not found in: lib/rt.jar
failure to think: ojvm.data.JavaException null
ojvm.data.JavaException
at ojvm.operations.Exceptions.makeAndThrow(Exceptions.java:40)
at ojvm.machine.ControlUnit.makeAndThrow(ControlUnit.java:216)
at ojvm.operations.BytecodeInterpreter.visit_new(BytecodeInterpreter.java:2125)
at ojvm.loading.instructions.Ins_new.accept(Ins_new.java:31)
at ojvm.machine.ControlUnit.run(ControlUnit.java:169)
at org.hacker.engine.war.HackVMWarSpinalCord.build(HackVMWarSpinalCord.java:219)
at org.hacker.engine.war.Faction.cityThink(Faction.java:167)
at org.hacker.engine.war.Faction.think(Faction.java:111)
at org.hacker.engine.war.WarModel.step(WarModel.java:77)
at org.hacker.engine.GameUI.stepToIt(GameUI.java:175)
at org.hacker.engine.GameUI$6.run(GameUI.java:108)
ojvm.loading.ClassNotFoundE: File java\lang\StringBuilder.class not found in: lib/rt.jar
at ojvm.loading.ClassFileInputStream.<init>(ClassFileInputStream.java:117)
at ojvm.loading.ClassInputStream.<init>(ClassInputStream.java:19)
at ojvm.operations.ClassLoading.findClass(ClassLoading.java:84)
at ojvm.operations.JarStreamClassLoading.findClass(JarStreamClassLoading.java:49)
at ojvm.machine.ControlUnit.findClass(ControlUnit.java:266)
at ojvm.operations.BytecodeInterpreter.visit_new(BytecodeInterpreter.java:2118)
at ojvm.loading.instructions.Ins_new.accept(Ins_new.java:31)
at ojvm.machine.ControlUnit.run(ControlUnit.java:169)
at org.hacker.engine.war.HackVMWarSpinalCord.think(HackVMWarSpinalCord.java:137)
at org.hacker.engine.war.Faction.unitThink(Faction.java:192)
at org.hacker.engine.war.Faction.think(Faction.java:114)
at org.hacker.engine.war.WarModel.step(WarModel.java:77)
at org.hacker.engine.GameUI.stepToIt(GameUI.java:175)
at org.hacker.engine.GameUI$6.run(GameUI.java:108)
EDIT: Well removing all String Concatenations solved this problem. It's a pitty, i often need to output some information to get an idea on how the bot got to it's decision. How do you handle debug output?