Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken in JDK12 #1

Open
jkflying opened this issue Jan 30, 2020 · 6 comments
Open

Broken in JDK12 #1

jkflying opened this issue Jan 30, 2020 · 6 comments

Comments

@jkflying
Copy link

I tried to run this under OpenJDK12 on Ubuntu 18.04 and Robocode 1.9.3.7, and I'm getting a weird error

It's crashing at

} while (!processOutput.equals(BattleProcess.READY_SIGNAL));
with a NPE, and if I add a processOutput == null || it hangs on engine initialization forever.

@Voidious
Copy link
Owner

Oh ok, thanks! I will try to take a look soon.

@jkflying
Copy link
Author

Got a bit further, it seems if I get all of the .jar files onto the classpath as per https://sourceforge.net/p/robocode/bugs/407/ at least it doesn't crash.

@jkflying
Copy link
Author

That seems to have fixed it. So I guess it just needs adding all of the classpaths to the rr.sh. It was a bit of a pain to debug because the stdout of the subprocesses doesn't get printed :-)

@jkflying
Copy link
Author

So it ends up needing something like:

RRCP=lib/guava-12.0.1.jar
for f in robocodes/r1/libs/*.jar; do
    RRCP=$RRCP:$f
done

java -cp $RRCP .....

@bumfo
Copy link

bumfo commented Feb 3, 2020

Got a bit further, it seems if I get all of the .jar files onto the classpath as per https://sourceforge.net/p/robocode/bugs/407/ at least it doesn't crash.

confirmed from here, robocode bug #407 can be resolved by adding all required jars explicitly.

@bumfo
Copy link

bumfo commented Feb 3, 2020

So it ends up needing something like:

RRCP=lib/guava-12.0.1.jar
for f in robocodes/r1/libs/*.jar; do
    RRCP=$RRCP:$f
done

java -cp $RRCP .....

Maybe we can do something cleaner than the hack, e.g.

https://cgjennings.ca/articles/java-9-dynamic-jar-loading/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants