Skip to end of metadata
Go to start of metadata

Error Message

If you get the error "Could not initialize class java.awt.Toolkit" when starting a setup

$ ./ -u
java -Dizpack.mode=privileged -jar "./joc.1.12.0.jar"
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
        at java.awt.Component.<clinit>(
        at com.izforge.izpack.installer.GUIInstaller.showFatalError(Unknown Source)
        at com.izforge.izpack.installer.GUIInstaller.<init>(Unknown Source)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
        at java.lang.reflect.Constructor.newInstance(
        at java.lang.Class.newInstance(
        at com.izforge.izpack.installer.Installer.main(Unknown Source)

then the Java environment misses a library.

Go into the subfolder lib/<os-arch> of the Java installation (e.g. /opt/jre8/lib/amd64) and check the library dependencies of

$ ldd =>  (0x00007ffd307fe000) => /lib64/ (0x00007f6f42498000) => /lib64/ (0x00007f6f42195000) => /opt/jdk1.8.0_77/jre/lib/amd64/ (0x00007f6f41ec3000) => /lib64/ (0x00007f6f41cb1000) => /lib64/ (0x00007f6f41972000) => /lib64/ (0x00007f6f41768000) => /lib64/ (0x00007f6f41564000) => not found => /lib64/ (0x00007f6f4114d000) => /opt/jdk1.8.0_77/jre/lib/amd64/ (0x00007f6f40f21000) => not found => /lib64/ (0x00007f6f40b5f000)
        /lib64/ (0x00007f6f42922000) => not found => /lib64/ (0x00007f6f4093c000) => not found => /opt/jdk1.8.0_77/jre/lib/amd64/ (0x00007f6f4072c000) => /lib64/ (0x00007f6f40528000) => not found

In above example is not found. The "not found" message for can be ignored.


Install the missing libraries

  • No labels
Write a comment…