Menu

#389 Third-party team JARs broken with Java 9

1.9.3.0
closed
None
1
2017-10-17
2017-10-03
No

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.

Discussion

  • Flemming N. Larsen

    • summary: Third-party team JARs broken on Java 9 --> Third-party team JARs broken, e.g. abc.ShadowTeam_3.83.jar
    • Priority: 1 --> 3
     
  • Flemming N. Larsen

    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.

     
  • MultiplyByZer0

    MultiplyByZer0 - 2017-10-13

    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:

    • Polylunar 1.6
    • NightmareTeam 3.3
    • AlephTeam 0.34
    • LuminariousDuo 1.13
    • LunarTwins 1.4a
    • PhoenixTeam 0.905DC
    • HOFSwarm 1.1
    • MyFirstTeam

    Teams that could not be loaded because of java.lang.ClassNotFoundException on Java 9, and worked on Java 8:

     

    Last edit: MultiplyByZer0 2017-10-13
  • Flemming N. Larsen

    • summary: Third-party team JARs broken, e.g. abc.ShadowTeam_3.83.jar --> Third-party team JARs broken with Java 9
    • Priority: 3 --> 1
     
  • Flemming N. Larsen

    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.

     
  • MultiplyByZer0

    MultiplyByZer0 - 2017-10-14

    It seems that all of the affected teams are packaged with another JAR inside their JAR. E.g. abc.ShadowTeam_3.83.jar has abc.Shadow_3.83.jar inside of it.

     
  • Flemming N. Larsen

    • status: open --> pending
    • assigned_to: Flemming N. Larsen
    • Group: Future Release --> 1.9.3.0
     
  • Flemming N. Larsen

    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)

     
  • MultiplyByZer0

    MultiplyByZer0 - 2017-10-16

    I can confirm this bug is fixed.

     
  • Flemming N. Larsen

    • status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB