Control: reassign -1 jython 2.7.1+repack1-1
Control: affects -1 jython-stilts
Control: retitle -1 jython: does not run with older Java versions
Control: tags -1 - moreinfo + patch

Jython allows to be installed with an old version of Java, but then
fails to run:

# apt install openjdk-8-jre-headless jython --no-install-recommends
# jython
Exception in thread "main" java.lang.NoSuchMethodError: 
java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer;
        at org.python.core.io.BufferedReader.clear(BufferedReader.java:147)
        at org.python.core.io.BufferedReader.<init>(BufferedReader.java:27)
        at org.python.core.PyFile.createBuffer(PyFile.java:227)
        at org.python.core.PyFile.file___init__(PyFile.java:185)
        at org.python.core.PyFile.file___init__(PyFile.java:178)
        at org.python.core.PyFile.<init>(PyFile.java:101)
        at org.python.core.PySystemState.<init>(PySystemState.java:237)
        at org.python.core.PySystemState.doInitialize(PySystemState.java:1112)
        at org.python.core.PySystemState.initialize(PySystemState.java:1023)
        at org.python.core.PySystemState.initialize(PySystemState.java:979)
        at org.python.core.PySystemState.initialize(PySystemState.java:974)
        at org.python.util.jython.run(jython.java:263)
        at org.python.util.jython.main(jython.java:142)

This is a compatibility problem introduced with Java 9. It can be solved
by replacing the dependency "java5-runtime-headless" by
"java9-runtime-headless"; see the attached patch. Launchpad bugs
#1771476 and #1784043 report similar problems, which would be fixed as
well.

Best

Ole


>From 7ac05bfe664a289895f1fd91d096d3a60c17f082 Mon Sep 17 00:00:00 2001
From: Ole Streicher <oleb...@debian.org>
Date: Tue, 12 Mar 2019 11:53:25 +0100
Subject: [PATCH] Increase minimal JRE version to Java9

Java 9 introduces an incompatibility by removing java.nio.ByteBuffer,
which is used in the binary package.

Closes: #924283
LP: #1771476, #1784043
---
 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 9f9ccb2..24ab015 100644
--- a/debian/control
+++ b/debian/control
@@ -32,7 +32,7 @@ Homepage: http://www.jython.org
 Package: jython
 Architecture: all
 Depends: ${misc:Depends}, ${perl:Depends}, ${python:Depends}, ${java:Depends},
- default-jre-headless | java5-runtime-headless,
+ default-jre-headless | java9-runtime-headless,
 Recommends: default-jdk | java-compiler
 Suggests: jython-doc, libmariadb-java, libpostgresql-jdbc-java
 Description: Python seamlessly integrated with Java
-- 
2.20.1

Reply via email to