Search code examples
javabatch-fileinstallationizpack

izpack java installer, shortcut with noShow still shows the batch window


Hi I am using izPack to create a windows java installer. I use the following to create a shortcut:

<shortcut
    name = "ApplicationName"
    target = "$INSTALL_PATH\start.bat"
    commandLine = ""
    workingDirectory= "$INSTALL_PATH"
    description="Application Desc"
    iconFile="$INSTALL_PATH\app.ico"
    iconIndex="0"
    initialState="noShow"
    programGroup="yes"
    desktop="yes"
    applications="no"
    startMenu="no"
    startup="no"/>

When I click on the created shortcut it executes the start.bat script, but the window does not hide. Thus I have two windows open...

My start.bat contains basically the following:

...
java -cp %CLASSPATH% com.package.Application >NUL 2>&1

It works with a second application that does not open a window and runs with javaw.

Does anybody know how to fix this?


Solution

  • I am not sure I got it right from your description, but have you tried to use javaw instead of java inside the bat itself? If yes, is that solution not what you want? It also seems this is the recommandation for a related question.