Paul Taylor
Paul Taylor

Reputation: 13190

Izpack installler failing on Windows with java.lang.NullPointerException

Updated application to use bundled version of Java 14, was previously using Java 8

Worked okay on Windows dev machine , but on other machine failing on unpacking the data with:

com.izforge.izpack.api.exception.IzPackException: An error occured
in java.lang.Thread.run() at Thread.java:832
in com.izforge.izpack.installer.unpacker.UnpackerBase.run() at UnpackerBase.java:241
in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:319
Caused by: java.lang.NullPointerException: null
in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:299
in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:475
in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:528
in com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() at UnpackerBase.java:627
in com.izforge.izpack.installer.unpacker.UnpackerBase.extract() at UnpackerBase.java:673
in com.izforge.izpack.installer.unpacker.LooseFileUnpacker.unpack() at LooseFileUnpacker.java:92
in java.io.File. () at File.java:362

Can't see why, does it not work reliably with Java 14 ?

Upvotes: 2

Views: 2977

Answers (2)

Frangu Mădălin
Frangu Mădălin

Reputation: 50

Does the other machine have java 14 jdk installed? You can check the following folder on windows:

C:\Program Files\Java

if you do have jdk-14 installed, try running inside the command prompt the following:

"C:\Program Files\Java\YourJdkVersion\bin\java" -jar YourCompiledJar.jar

If the app runs correctly using the command above, it's because of the environment variable. In that case, do the following:

Right click My Computer and select Properties. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02. (should be something like jdk-14 in your case)

from docs.oracle.com

Upvotes: 1

Mikhail Bulanev
Mikhail Bulanev

Reputation: 36

There are some difference between jdk. Try to use jdk from:

  1. https://adoptopenjdk.net/
  2. https://www.oracle.com/java/technologies/javase/jdk14-archive-downloads.html

Be sure that you change system path for new jdk, and you use another jdk that earlier.

Upvotes: 1

Related Questions