Installers built with Izpack 5.1.2 hang under Java 10: java.base/jdk.internal.lo\ader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader

Description

Ptolemy II installers built using IzPack 5.1.2 hang while unpacking under Java 10 under Windows and Mac.

The installers were built using https://oss.sonatype.org/content/repositories/releases/org/codehaus\
/izpack/izpack-dist/5.1.2/izpack-dist-5.1.2.jar

Under Windows and Mac, I'm creating .exe and .app installers that don't have a console, so running the installer just hangs, there is no error message.

A little sleuthing caused me to run the jar directly so that I could see stdout.

bash-3.2$ java -jar ptII11.0.devel.setup.mac.jar
Command line arguments:
====================
Installation started
Exception in thread "IzPack - Unpacker thread" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
at com.izforge.izpack.installer.unpacker.UnpackerBase.logIntro(UnpackerBase.java:253)
at com.izforge.izpack.installer.unpacker.UnpackerBase.unpack(UnpackerBase.java:285)
at com.izforge.izpack.installer.unpacker.UnpackerBase.run(UnpackerBase.java:242)
at java.base/java.lang.Thread.run(Thread.java:844)

Happily, this seems to be fixed in the Git head.

I'm submitting this bug so that others know that if an IzPack installer is to be used under Java 10, then IzPack from the Git repo should be used.

To close this bug, an installer should be tested under Java 10.

Environment

macOS 10.13.4

bash-3.2$ bash-3.2$ java -version
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

Status

Assignee

Unassigned

Reporter

Christopher Brooks

Impact

Functional - may break existing environments

Components

Affects versions

Priority

Medium
Configure