dgiagio / warp

Create self-contained single binary applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

when start Java warped on windows, there is a cmd window, how to hide it?

zenos879 opened this issue · comments

thank you for great work ! i have followed:#51 to wrap my java program on windows 10. and i succeed to build my "exe“. but when start the ”exe“, it always started with a cmd window. this is not elegant for my customers. i tried to hide it in the way below ,but failed, all this can do is to minimize the window.

@ECHO OFF
:: below is to minimized cmd window
if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit
SETLOCAL
SET "JAVA_EXE=%~dp0\jre\bin\java.exe"
SET "APP_JAR=%~dp0\demo.jar"
%JAVA_EXE% -jar %APP_JAR% -Djava.ext.dirs=%~dp0\jre\lib

this is the cmd i used to wrap my exe, i think the key is the param "exec", need your help~~
warp-packer.exe --arch windows-x64 --input_dir "./bundle" --exec run.cmd --output cntvFtpClientV5.exe

thank you for tool by the way.

Hi @zenos879 ,
You could try to use javaw instead.
SET "JAVA_EXE=%~dp0\jre\bin\javaw.exe"