Closed GoogleCodeExporter closed 9 years ago
unfortunately (as far as I know) we must decide if we want to create the exe as
a console application or window application.
The window application doesn't interfere with a currently opened or not opened
console (if I start it from the explorer, no console will open, if I start it
from the console, it will NOT kill the console if I close Umlet). Unfortunately
the window application doesn't return an exit code.
Switching to a console application would help, but then starting umlet would
also always start a console in the background which we don't want. And if I
close this console within the program code of the exe, it would also close a
manually opened console from which you have started umlet.
Therefore we decided to not take action on this, because the exe is mainly a
help for people who do not use the console and want to quickly start the
program.
If you need the exit code, please use "java -jar umlet.jar" to start the
program.
If you have a working solution feel free to add a comment :)
(just for documentation some code parts which I thought would help)
Code to kill the console for console applications:
http://stackoverflow.com/questions/14416982/in-a-wpf-app-how-do-you-override-the
-console-close-command
Code to return the exit code from the jar with the exe:
proc.WaitForExit();
int exitCode = proc.ExitCode;
proc.Close();
Environment.Exit(exitCode);
Original comment by AFDiaX
on 22 Jun 2013 at 2:27
Original issue reported on code.google.com by
dant...@gmail.com
on 28 Aug 2012 at 7:11