On 2/12/21 6:12 PM, Kurt Mosiejczuk wrote:
On Fri, Feb 12, 2021 at 04:54:35PM +0100, Peter Hessler wrote:
On 2021 Feb 12 (Fri) at 15:06:00 +0100 (+0100), Muhammad Kaisar Arkhan wrote:

:The reason why it crashed on Java 8 and runs on Java 11 is because of LWJGL
:being compiled on Java 11 which generates a JNI (Java Native Interface)
:that's incompatible with Java 8.

:From my experience, I get this exception:
:java.lang.NoSuchMethodError:
:java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;

:This is a rather common issue and the typical solution is to compile the  JNI
:with Java 8.

My concern is the best out-of-box experience for players who want to play
the current version of Minecraft, 1.16.  Players that want to play older,
and especially modded older versions, should still work but may need to
change their configs.

This could be something we document in a README or DESCR, though;
because I do want to still play some older versions myself.  Also, at a
later point, I'd like to remove the RUN_DEPENDS on lwjgl2; but still
allow players to manually install it for older versions.

<1.12 uses lwjgl2 only, so imho the lwjgl3 package can stay with java11.

Kurt, any opinions?

Well, I chose Java 11 largely because when building with Java 8, the build
stops and says it recommends building with Java 10 or newer and asks if you
want to proceed. It doesn't do that with Java 11. Builds aren't interactive
so that would fail the build.

--Kurt


The following diff for lwjgl3 should remove the manual user input.

--- build.xml.orig      Fri Feb 12 20:24:59 2021
+++ build.xml   Fri Feb 12 20:26:04 2021
@@ -1139,20 +1139,6 @@
                 <not><isset property="env.JAVA8_HOME"/></not>
             </condition>
         </fail>
-
-        <local name="input"/>
-        <input
- message="It is recommended to build LWJGL releases on JDK 10 or higher. Continue with current JDK?"
-            validargs="y,n"
-            defaultvalue="n"
-            addproperty="input"
-            unless:set="jdk10"
-        />
-        <fail message="Cancelled" unless:set="jdk9">
-            <condition>
-                <equals arg1="n" arg2="${input}"/>
-            </condition>
-        </fail>
     </target>

<!-- Set the LWJGL_BUILD_OFFLINE=true environment variable for local builds. -->

--
Muhammad Kaisar Arkhan
h...@yukiisbo.red - kai...@arkhan.io
https://yukiisbo.red - https://arkhan.io

Reply via email to