https://bz.apache.org/bugzilla/show_bug.cgi?id=63457
--- Comment #2 from David Pérez Serrada <[email protected]> --- Created attachment 36594 --> https://bz.apache.org/bugzilla/attachment.cgi?id=36594&action=edit Sample Source Code Simple and ugly code showing the problem. -------------------------------------------------------------------------------- dperez@pc-dperezs /cygdrive/d/temp $ /cygdrive/d/java/jdks/jdk1.8.0_171/bin/javac -cp ant-1.10.6.jar ZipTest.java dperez@pc-dperezs /cygdrive/d/temp $ java -version java version "1.8.0_171" Java(TM) SE Runtime Environment (build 1.8.0_171-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode) dperez@pc-dperezs /cygdrive/d/temp $ java -cp "ant-1.10.6.jar;." ZipTest Begin Exception in thread "main" java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer; at org.apache.tools.zip.NioZipEncoding.encode(NioZipEncoding.java:105) at org.apache.tools.zip.ZipOutputStream.getName(ZipOutputStream.java:1646) at org.apache.tools.zip.ZipOutputStream.writeLocalFileHeader(ZipOutputStream.java:1059) at org.apache.tools.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:769) at ZipTest.main(ZipTest.java:18) dperez@pc-dperezs /cygdrive/d/temp $ java -cp "ant-1.10.5.jar;." ZipTest Begin End dperez@pc-dperezs /cygdrive/d/temp $ java -cp "ant-1.10.6.jar;." ZipTest^C dperez@pc-dperezs /cygdrive/d/temp $ . setjava11.sh dperez@pc-dperezs /cygdrive/d/temp $ java -version openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment 18.9 (build 11.0.2+9) OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode) dperez@pc-dperezs /cygdrive/d/temp $ java -cp "ant-1.10.6.jar;." ZipTest Begin End -------------------------------------------------------------------------------- -- You are receiving this mail because: You are the assignee for the bug.
