1.16.x java.lang.UnsupportedClassVersionError

Discussion in 'Spigot Plugin Development' started by Fake_Name131, Jul 12, 2020.

  1. I was coding a custom plugin for a server called MarsCraft and whenever i tried to run it, I got an error saying that the plugin was compiled by a more recent version of Java (class file version 55.0) while the server only works with class file version 52.0 and earlier. Well, the fix is simple, right? Just upgrade Java on the machine you are running the server on. Well, that would not work because the server is hosted on a machine that I do not have access to because it is run by a hosting company (Sparked Host) so I cannot upgrade their Java version. Is there any way to downgrade the Java version in Eclipse, and if so, what version should i downgrade it to?

    The full logs are here: https://pastebin.com/J40tGTg8
  2. joehot200


    From memory I believe 52 is java 8. I don't think it's java 7, that's for sure, so downgrading to Java 8 should be fine. Edit: I double checked, it's java 8.

    Depends what IDE you're using, but usually you can change the Java library. In Eclipse (which is what I use), you go to the project properties, libraries, and change the library to something like "Java SE 8".
  3. Thank you soo much, this really helped, and it was also nice that it only took line 20 mins 4 u to find this. Thx :)
    • Friendly Friendly x 1