From: Andrey on
Hello,

I have a module which uses GUIKit to build some user interface in
Mathematica.

It works OK from Mathematica frontend but it does not work in batch
mode:

"f:/program files/wolfram research/mathematica/7.0/math.exe" -initfile
".../path/gui-module.m" -noprompt

Get out the exception:

GUIRun::err: The following GUIKit runtime error
occurred :java.lang.NullPointerException.

GUIRunModal::nvalid: The GUI definition contains invalid content.

What may be the reason?

Regards,

-Andrey

From: David Bailey on
Andrey wrote:
> Hello,
>
> I have a module which uses GUIKit to build some user interface in
> Mathematica.
>
> It works OK from Mathematica frontend but it does not work in batch
> mode:
>
> "f:/program files/wolfram research/mathematica/7.0/math.exe" -initfile
> ".../path/gui-module.m" -noprompt
>
> Get out the exception:
>
> GUIRun::err: The following GUIKit runtime error
> occurred :java.lang.NullPointerException.
>
> GUIRunModal::nvalid: The GUI definition contains invalid content.
>
> What may be the reason?
>
> Regards,
>
> -Andrey
>
I used to base my Super Widget Package (SWP) on GUIKit, but I found it
had a lot of bugs, and I seem to remember something of that sort! My
impression is that WRI are not really interested in fixing the GUIKit
now that you can make GUI's in notebooks, but Java GUI's tend to look
nicer for non-Mathematica users.

My SWP is an easier to use GUIKit (and has somewhat more documentation!)
that now works directly with J/Link, so if you feel like converting, it
is available free from my website. BTW, I have not converted the help
system to use the DC - so it is probably best to open the help notebook
and just read it.

David Bailey
http://www.dbaileyconsultancy.co.uk