Issue
I have made JAR file using Netbeans IDE's clean & build option. When I'm double clicking that Jar file, programs runs with javaw which is not showing me output in console i.e in command window
I want to make Jar file with Java.exe instead of jawaw using netbeans, which will run on double click or with windows task scheduler and display me output in command prompt. Please help me for this issue.
Solution
On double click it will run with javaw by default. Better way to do so is make the Jar file and then convert it to .exe file with Launch4J with below settings,
- In Basic tab - Specify Output.exe filename.
- In Basic tab - Set the jar file location.
- In JRE tab specify the minimum JRE version.
- In Header tab - Change Header type to console instead of GUI.
And build the wrapper.
4th step will sort your problem, Which will run program in console(command prompt) on running .exe file either on double click or running from Windows Task scheduler.
Answered By - user6294821