I made an installer with latest Install4J and want to install the package on a raspberry pi for testing.
It's running latest Raspbian Image with latest updates and openJDK v.1.8.0.40
If I try to start the installer in unattended mode (-q) I get a "Starting Installer..." message and then I get a NullPointerException.
This is the console output:
pi@raspberrypi:~ $ ./plentyBase.sh -q Starting Installer ... java.lang.NullPointerException at javax.swing.RepaintManager.currentManager(RepaintManager.java:262) at javax.swing.JComponent.repaint(JComponent.java:4799) at java.awt.Component.repaint(Component.java:3303) at javax.swing.JComponent.setFont(JComponent.java:2756) at javax.swing.LookAndFeel.installColorsAndFont(LookAndFeel.java:208) at javax.swing.plaf.basic.BasicPanelUI.installDefaults(BasicPanelUI.java:66) at javax.swing.plaf.basic.BasicPanelUI.installUI(BasicPanelUI.java:56) at javax.swing.JComponent.setUI(JComponent.java:664) at javax.swing.JPanel.setUI(JPanel.java:153) at javax.swing.JPanel.updateUI(JPanel.java:126) at javax.swing.JPanel.<init>(JPanel.java:86) at javax.swing.JPanel.<init>(JPanel.java:109) at javax.swing.JPanel.<init>(JPanel.java:117) at com.install4j.runtime.installer.frontend.FormPanel.<init>(FormPanel.java:50) at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(AbstractHeadlessScreenExecutor.java:67) at com.install4j.runtime.installer.frontend.headless.UnattendedScreenExecutor.<init>(UnattendedScreenExecutor.java:48) at com.install4j.runtime.installer.frontend.headless.InstallerUnattendedScreenExecutor.<init>(InstallerUnattendedScreenExecutor.java:10) at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:88) at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:58) at com.install4j.runtime.installer.Installer.main(Installer.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65) at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57) An error occurred: java.lang.NullPointerException Error log: /tmp/install4jError7183942791429390239.log java.lang.NullPointerException at javax.swing.RepaintManager.currentManager(RepaintManager.java:262) at javax.swing.JComponent.repaint(JComponent.java:4799) at java.awt.Component.repaint(Component.java:3303) at javax.swing.JComponent.setFont(JComponent.java:2756) at javax.swing.LookAndFeel.installColorsAndFont(LookAndFeel.java:208) at javax.swing.plaf.basic.BasicPanelUI.installDefaults(BasicPanelUI.java:66) at javax.swing.plaf.basic.BasicPanelUI.installUI(BasicPanelUI.java:56) at javax.swing.JComponent.setUI(JComponent.java:664) at javax.swing.JPanel.setUI(JPanel.java:153) at javax.swing.JPanel.updateUI(JPanel.java:126) at javax.swing.JPanel.<init>(JPanel.java:86) at javax.swing.JPanel.<init>(JPanel.java:109) at javax.swing.JPanel.<init>(JPanel.java:117) at com.install4j.runtime.installer.frontend.FormPanel.<init>(FormPanel.java:50) at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(AbstractHeadlessScreenExecutor.java:67) at com.install4j.runtime.installer.frontend.headless.UnattendedScreenExecutor.<init>(UnattendedScreenExecutor.java:48) at com.install4j.runtime.installer.frontend.headless.InstallerUnattendedScreenExecutor.<init>(InstallerUnattendedScreenExecutor.java:10) at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:88) at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:58) at com.install4j.runtime.installer.Installer.main(Installer.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65) at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57) This is the content of the error log:
pi@raspberrypi:~ $ cat /tmp/install4jError7183942791429390239.log Exception: java.lang.NullPointerException at javax.swing.RepaintManager.currentManager(RepaintManager.java:262) at javax.swing.JComponent.repaint(JComponent.java:4799) at java.awt.Component.repaint(Component.java:3303) at javax.swing.JComponent.setFont(JComponent.java:2756) at javax.swing.LookAndFeel.installColorsAndFont(LookAndFeel.java:208) at javax.swing.plaf.basic.BasicPanelUI.installDefaults(BasicPanelUI.java:66) at javax.swing.plaf.basic.BasicPanelUI.installUI(BasicPanelUI.java:56) at javax.swing.JComponent.setUI(JComponent.java:664) at javax.swing.JPanel.setUI(JPanel.java:153) at javax.swing.JPanel.updateUI(JPanel.java:126) at javax.swing.JPanel.<init>(JPanel.java:86) at javax.swing.JPanel.<init>(JPanel.java:109) at javax.swing.JPanel.<init>(JPanel.java:117) at com.install4j.runtime.installer.frontend.FormPanel.<init>(FormPanel.java:50) at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(AbstractHeadlessScreenExecutor.java:67) at com.install4j.runtime.installer.frontend.headless.UnattendedScreenExecutor.<init>(UnattendedScreenExecutor.java:48) at com.install4j.runtime.installer.frontend.headless.InstallerUnattendedScreenExecutor.<init>(InstallerUnattendedScreenExecutor.java:10) at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:88) at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:58) at com.install4j.runtime.installer.Installer.main(Installer.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65) at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57) System properties: java.runtime.name=OpenJDK Runtime Environment exe4j.moduleName=/home/pi/plentyBase.sh sun.boot.library.path=/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm java.vm.version=25.40-b08 java.vm.vendor=Oracle Corporation java.vendor.url=http://java.oracle.com/ path.separator=: java.vm.name=OpenJDK Zero VM file.encoding.pkg=sun.io sun.java.launcher=SUN_STANDARD sun.os.patch.level=unknown install4j.exeDir=/home/pi/ java.vm.specification.name=Java Virtual Machine Specification user.dir=/home/pi/plentyBase.sh.939.dir java.runtime.version=1.8.0_40-internal-b04 java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment i4jv=0 java.endorsed.dirs=/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/endorsed os.arch=arm java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Oracle Corporation os.name=Linux exe4j.totalDataLength=36451286 sun.java2d.noddraw=true sun.jnu.encoding=UTF-8 java.library.path=/home/pi/plentyBase.sh.939.dir/user::/usr/java/packages/lib/arm:/usr/lib/arm-linux-gnueabihf/jni:/lib/arm-linux-gnueabihf:/usr/lib/arm-linux-gnueabihf:/usr/lib/jni:/lib:/usr/lib java.specification.name=Java Platform API Specification java.class.version=52.0 os.version=4.4.50+ i4j.vpt=true install4j.cwd=/home/pi user.home=/home/pi user.timezone=Etc/UTC java.awt.printerjob=sun.print.PSPrinterJob file.encoding=UTF-8 install4j.jvmDir=/usr/lib/jvm/java-8-openjdk-armhf/jre java.specification.version=1.8 java.class.path=i4jruntime.jar user.name=pi java.vm.specification.version=1.8 sun.java.command=com.install4j.runtime.launcher.UnixLauncher launch 0 com.install4j.runtime.installer.Installer -q java.home=/usr/lib/jvm/java-8-openjdk-armhf/jre sun.arch.data.model=32 user.language=en java.specification.vendor=Oracle Corporation awt.toolkit=sun.awt.X11.XToolkit java.vm.info=interpreted mode java.version=1.8.0_40-internal java.ext.dirs=/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/ext:/usr/java/packages/lib/ext sun.boot.class.path=/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-armhf/jre/classes java.awt.headless=true install4j.appDir=/home/pi/ java.vendor=Oracle Corporation file.separator=/ java.vendor.url.bug=http://bugreport.sun.com/bugreport/ sun.font.fontmanager=sun.awt.X11FontManager sun.io.unicode.encoding=UnicodeLittle sun.cpu.endian=little sun.cpu.isalist= The same installer is working fine on Ubuntu 16.04 LTS in a virtual machine.
Edit: I think it comes from JPanel init to get FontMetrics?
Found it here: NPE when calling new JPanel() in headless (RepaintManager.currentManager)
So it looks like a bug in install4J.
If I open the installer on desktop/gui mode on raspberry pi the installer is working fine.
Any ideas what's wrong?