Skip to content

Install instructions

Haeki edited this page Mar 31, 2016 · 41 revisions

Installation

Simple:

Just download JavaKara from here and the files from the repository.
Open a labyrinth from the example world and enter the following code in the editor:

PathFinder pathFinder;
public void myProgram() {
  pathFinder = new PathFinder(tools, world, kara);
  pathFinder.start();
}

You must save your program in the same directory as the PathFinder source Files.


Advanced:

Since there is no function in kara to get the direction kara is facing it can cause some troubles if kara isn't facing in the right directon at the start.
The solution to fix this is to manipulate some code in the javakara.jar

  1. get the relevant file out of the javakara.jar and decompile it.
  • open the javakara.jar with for example 7zip.
  • go into the javakara diretory and copy the JavaKaraProgram$JavaKara.class file.
  • decompile it (for example here)
  1. modify the file and recompile it.
  • in the decompieled file search for private Kara kara and change private to public.
  • recompile the file using:
    javac -classpath pathToThe/javakara.jar pathToThe/ModifiedClass
  1. put the new file back in the javakara.jar and replace the old one.
  2. now you can use PathFinderModded instead of PathFinder.
Clone this wiki locally