javainstall4j

Install4J build fails with exceptions


I have following trial version of install4j Multi-Platform Edition 10.0.2 (build 10046) installed. Also installed are JDK 17.0.4 and JDK 1.8.333 (64 bit). I am getting following exceptions whenever I try to build:

Preparing configuration

Creating directory for temporary files

Directory for temporary media files is C:\Users\RAMCHA~1\AppData\Local\Temp\install4j10000746811088592861_dir
Finding JDK release 8/latest [windows-amd64]

Build failed.

Cause: java.net.SocketTimeoutException
       timeout (loc: 4)
Stack trace:

com.exe4j.a.d: java.net.SocketTimeoutException: timeout (loc: 4)
    at com.install4j.b.j.b(ejt:287)
    at com.install4j.gui.b.run(ejt:103)
Caused by: java.net.SocketTimeoutException: timeout (loc: 4)
    at com.install4j.runtime.installer.platform.win32.wininet.CallImpl.checkExceptionAndClose(CallImpl.java:60)
    at com.install4j.runtime.installer.platform.win32.wininet.CallImpl.sendRequest(CallImpl.java:118)
    at com.install4j.runtime.installer.platform.win32.wininet.WinInet.open(WinInet.java:150)
    at com.install4j.runtime.installer.helper.content.WinInetCallWrapper.connect(WinInetCallWrapper.java:57)
    at com.install4j.runtime.installer.helper.content.HttpRequestHandler.createWindowsConnection(HttpRequestHandler.java:154)
    at com.install4j.runtime.installer.helper.content.HttpRequestHandler.connect(HttpRequestHandler.java:129)
    at com.install4j.runtime.installer.helper.content.TextRequestHandler.connect(TextRequestHandler.java:99)
    at com.install4j.jdk.spi.impl.a.a(ejt:123)
    at com.install4j.jdk.spi.impl.AdoptOpenJdkProvider.a(ejt:37)
    at com.install4j.jdk.spi.impl.a.a(ejt:120)
    at com.install4j.jdk.spi.impl.AdoptOpenJdkProvider.a(ejt:53)
    at com.install4j.jdk.spi.impl.AdoptOpenJdkProvider.a(ejt:14)
    at com.install4j.jdk.spi.impl.AdoptOpenJdkProvider$a$1$1.invokeSuspend(ejt:19)
    at com.install4j.jdk.spi.impl.AdoptOpenJdkProvider$a$1$1.a(ejt)
    at com.install4j.jdk.spi.impl.AdoptOpenJdkProvider$a$1$1.invoke(ejt)
    at com.install4j.jdk.spi.impl.a$a$a.invokeSuspend(ejt:134)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
    Suppressed: java.net.SocketTimeoutException: timeout (loc: 4)
        ... 24 more
    Suppressed: java.net.SocketTimeoutException: timeout (loc: 4)
        ... 24 more
    Suppressed: java.net.SocketTimeoutException: timeout (loc: 4)
        ... 24 more

How do I fix this issue?


Solution

  • You do not have internet connectivity, which is a problem for a build, because code signing and JRE bundle creation require an internet connection.

    install4j will try to download a suitable JDK for script compilation. If you update to the current version (10.0.4+), there will be no failure in this case, just a warning that install4j will have to use the JRE that it is running with for that purpose.