Search code examples
install4j

install4j After installation application doesn't run


I have following problem with my install4j installer. My app. doesn't start when I run it from installer. enter image description here

I see in installer logs that runScript with ID=260 completed successfully:

[INFO] com.install4j.runtime.beans.actions.misc.RunExecutableAction [ID 260]: Execute action
       Property arguments: [logging of arguments is disabled]
       Property environmentVariables: {}
       Property executable: CaaS_Agent
       Property returnCodeVariable: 
       Property rollbackArguments: null
       Property rollbackExecutable: null
       Property rollbackWorkingDirectory: null
       Property stderrFile: null
       Property stderrRedirectionMode: No redirection
       Property stderrVariableName: 
       Property stdinFile: null
       Property stdinRedirectionMode: No redirection
       Property stdinString: 
       Property stdoutFile: null
       Property stdoutRedirectionMode: No redirection
       Property stdoutVariableName: 
       Property timeout: 0
       Property workingDirectory: .
       Property failOnStderrFileError: false
       Property failOnStdinFileError: false
       Property failOnStdoutFileError: false
       Property includeParentEnvironmentVariables: true
       Property keepConsoleWindow: false
       Property logArguments: false
       Property rollbackSupported: false
       Property showWindowsConsole: false
       Property updateStderrVariableLines: false
       Property updateStdoutVariableLines: false
       Property useRollbackExecutable: false
       Property wait: false
       Property waitForStreams: true
       used working dir: /opt/Cipher/Caas_Agent/.
       Execute action successful after 514 ms
[INFO] com.install4j.runtime.beans.screens.FinishedScreen [ID 20]: command: finish
       cleaning up
       Finished at 2024-03-13 15:04:29 

In error.log i found only standard error that doesn't influence to app. workability:

java.lang.UnsupportedOperationException: Unable to open DISPLAY
    at com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(GtkApplication.java:142)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:140)
    at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41)
    at com.sun.glass.ui.Application.run(Application.java:147)
    at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:279)
    at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
    at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:695)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:182)
    at java.lang.Thread.run(Thread.java:750)

P.S. For Windows installer following case works correct.


Solution

  • If your "Request privileges" action has its "Linux privilege requirement" property set to "Try to obtain privileges" and the "Run executable or batch file" action has its "Action elevation type" property set to "Elevate to maximum available privileges", the application will be started as root and may not have access to your display.

    Set the "Action elevation type" property to "Do not elevate" to fix this problem.