Exception in main method --> dialog

If my main() method throws an exception, then a dialog comes up, with title "Java Virtual Machine Launcher", and message "Fatal exception occurred. Program will exit.".

I reckon this is brought up by javaw (Sun documentation says "The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason.").

Does anyone know if it is possible to avoid this? As I say, I reckon this is more a javaw issue, but it affects usage of IDEA.

4 comments
Comment actions Permalink

Hi,

Why not to catch the exception, print stack trace / log it, and the
gracefully exit?

Calum MacLean wrote:

If my main() method throws an exception, then a dialog comes up, with title "Java Virtual Machine Launcher", and message "Fatal exception occurred. Program will exit.".

I reckon this is brought up by javaw (Sun documentation says "The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason.").

Does anyone know if it is possible to avoid this? As I say, I reckon this is more a javaw issue, but it affects usage of IDEA.



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

That's what I've done in this case.

However, I don't generally want to have to catch runtime exceptions in my main() method, so I still think it would be useful if the dialog didn't appear if an exception is thrown out of the main method.

0
Comment actions Permalink

I'm afraid we have no control over this dialog, since we do not use our
launcher with javaw.

"Calum MacLean" <no_mail@jetbrains.com> wrote in message
news:20520791.1082726704432.JavaMail.itn@is.intellij.net...

If my main() method throws an exception, then a dialog comes up, with

title "Java Virtual Machine Launcher", and message "Fatal exception
occurred. Program will exit.".
>

I reckon this is brought up by javaw (Sun documentation says "The javaw

launcher will, however, display a dialog box with error information if a
launch fails for some reason.").
>

Does anyone know if it is possible to avoid this? As I say, I reckon this

is more a javaw issue, but it affects usage of IDEA.


0
Comment actions Permalink

Fixed in #2014

--

Dmitry Peshehonov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


"Calum MacLean" <no_mail@jetbrains.com> wrote in message
news:20520791.1082726704432.JavaMail.itn@is.intellij.net...

If my main() method throws an exception, then a dialog comes up, with

title "Java Virtual Machine Launcher", and message "Fatal exception
occurred. Program will exit.".
>

I reckon this is brought up by javaw (Sun documentation says "The javaw

launcher will, however, display a dialog box with error information if a
launch fails for some reason.").
>

Does anyone know if it is possible to avoid this? As I say, I reckon this

is more a javaw issue, but it affects usage of IDEA.


0

Please sign in to leave a comment.