bytesocks icon indicating copy to clipboard operation
bytesocks copied to clipboard

Is the target Java version for this project Java 8?

Open kmecpp opened this issue 2 years ago • 6 comments

I see in the pom that the target Java version is Java 8.

javap -v BytesocksClientImpl.class shows major version: 55 which corresponds to Java 11.

This is causing the class to fail to load on my server and breaking Spark.

Is this project somehow being compiled with JDK 11?

kmecpp avatar Jul 20 '23 03:07 kmecpp

I think you are looking at the wrong repo: https://github.com/lucko/bytesocks-java-client

Yes the min version of the client is Java 11

lucko avatar Jul 23 '23 10:07 lucko

I see. Is it possible to switch the client to Java 8 since Spark (which I believe is the only dependent plugin) is on Java 8?

kmecpp avatar Jul 24 '23 22:07 kmecpp

No because it uses the java websocket API which was introduced in J11

lucko avatar Jul 26 '23 09:07 lucko

What about make bytesocks-java-client optional for spark?

kmecpp avatar Jul 27 '23 04:07 kmecpp

It already is

lucko avatar Jul 27 '23 06:07 lucko

Ah I see. This is the exception I get on the server when I try to run the latest version of Spark


[01:14:38 ERROR]: Error occurred while enabling spark v1.10.34 (Is it up to date?)
java.lang.NoClassDefFoundError: me/lucko/spark/lib/bytesocks/BytesocksClientImpl
        at me.lucko.spark.lib.bytesocks.BytesocksClientFactory.<clinit>(BytesocksClientFactory.java:33) ~[?:?]
        at me.lucko.spark.common.SparkPlatform.<init>(SparkPlatform.java:130) ~[?:?]
        at me.lucko.spark.bukkit.BukkitSparkPlugin.onEnable(BukkitSparkPlugin.java:68) ~[?:?]
        ...

Looks like also catching NoClassDefFoundError should fix the problem

kmecpp avatar Jul 30 '23 05:07 kmecpp