Skip to content

Auto Launching Java

Tyler edited this page Nov 11, 2018 · 2 revisions

Java bots have two components: A small python file that is managed by the RLBot framework, and a Java process that holds the real logic.

Historically, it had always been necessary to start the Java process manually. It is now possible to have the framework start it automatically by providing a path to the .bat file (or other executable) associated with Java.

To take advantage of this, the python part of your bot must set self.java_executable_path. Here in RLBotJavaExample, this is done by setting and reading a value from the cfg file, but that is not strictly necessary. As long as self.java_executable_path ends up with some value like "C:\Users\Me\MyBot\bin\MyBot.bat" it ought to work.

This is mainly useful in situations like tournaments where your bot has been compiled into a zip (using the distZip gradle target) and then unzipped on somebody's computer. At that point there will be an appropriate .bat file. For local development, you will likely still want to start the java process manually so it's easy to do breakpoint debugging.

Clone this wiki locally