leekscript icon indicating copy to clipboard operation
leekscript copied to clipboard

Java compiler hardcoded file path

Open Bux42 opened this issue 3 months ago • 0 comments

Hey

I've been trying to set up the leek-wars-generator project locally (based on this commit)

And when I was testing the example fight scenario1 wouldn't work, the basic.leek AI refuses to compile, with the following errors: package com.leekwars.generator.fight.entity does not exist and cannot find symbol X

After some investigation I found this line which is a hardcoded path ":/home/pierre/dev/leek-wars/generator/bin/main"

And since this path is used to compile the AI leekscript on the fly (giving the required class paths), it breaks compilation

My workaround was to set classpath to the correct relative paths:

classpath = "build/classes/java/main;leekscript/build/classes/java/main";

And it fixes the issue but I am no java expert and I don't know if this syntax ^ will work on all machines / environments

Bux42 avatar Oct 12 '25 13:10 Bux42