Loading teams from JAR files does not work on Java 9.
For example, if you try to run two ShadowTeams against each other, you will recieve this error message:
Got an error with abc.Shadow: java.lang.ClassNotFoundException: abc.Shadow
Got an error with abc.Shadow: java.lang.ClassNotFoundException: abc.Shadow
Got an error with abc.Shadow: java.lang.ClassNotFoundException: abc.Shadow
Got an error with abc.Shadow: java.lang.ClassNotFoundException: abc.Shadow
Got an error with abc.Shadow: java.lang.ClassNotFoundException: abc.Shadow
Got an error with abc.Shadow: java.lang.ClassNotFoundException: abc.Shadow
Got an error with abc.Shadow: java.lang.ClassNotFoundException: abc.Shadow
Got an error with abc.Shadow: java.lang.ClassNotFoundException: abc.Shadow
Got an error with abc.Shadow: java.lang.ClassNotFoundException: abc.Shadow
Got an error with abc.Shadow: java.lang.ClassNotFoundException: abc.Shadow
abc.ShadowTeam_3.83.jar is present in robots/, and it works when run under Java 8u144. This is with Robocode 1.9.2.6 on Windows 10.
The issue with abc.ShadowTeam_3.83.jar is not Java 9 related. It does not run under 1.9.2.6 with Java 8.
I can run ShadowTeam perfectly well on Java 8u144 (Windows 10, Robocode 1.9.3.0 git master).
More testing shows that not every third-party team is broken on Java 9. Teams that always work:
Teams that could not be loaded because of
java.lang.ClassNotFoundExceptionon Java 9, and worked on Java 8:Last edit: MultiplyByZer0 2017-10-13
OK. I found out that my robot cache was not cleaned/removed correctly when switching betwen Java 8 and 9. You are right that the problem occurs with Java 9.
It seems that all of the affected teams are packaged with another JAR inside their JAR. E.g.
abc.ShadowTeam_3.83.jarhasabc.Shadow_3.83.jarinside of it.Finally, I got a fix for it. The URLClassLoader.findResource() method has changed in Java 9, which returns null for entries in JAR files inside JAR files (jarjar)
I can confirm this bug is fixed.