[RFC][icedtea-web] Launch errors are not being printed to terminal.
ddadacha at redhat.com
Mon Mar 12 08:07:59 PDT 2012
On 12/03/12 04:23 AM, Jiri Vanek wrote:
> On 03/11/2012 06:01 AM, Omair Majid wrote:
>> On 03/09/2012 12:16 PM, Danesh Dadachanji wrote:
>>> If javaws is run with -headless and a launch error occurs, no message is
>>> printed and javaws exits.
>> By no message do you mean nothing at all (or is a single line message
>> printed without an exception stack trace)?
>>> An exception is only shown if -verbose is
>>> passed too. This patch fixes it so that if -headless OR -verbose is
>>> used, the error and stacktrace are shown.
>>> Furthermore, when javaws -verbose is used (_without_ -headless), the
>>> stacktrace is printed to stderr too. This will come in handy once GUI
>>> testing for applets is available.
>> I am not sure how. Applets don't use GuiLaunchHandler.
They do from what I can tell. The handler is set to a
DefaultLaunchHandler if -headless is passed, otherwise to
GuiLaunchHandler - see JNLPRuntime.initialize(). From here, I can see a
number of methods calling Launcher.launchError() which calls the
handler's launchError(), the method I've modified. For example,
> I guess he have been thinking about gui tests at all. There will be gui
> tests also for javaws launches and in this case this become handy.
> For applets inside browser this should be solved in new spalshscreen.
> Also it is not possible to lunch applets inside browser headless.
> Also javaws -headless someAppelt is not working curently - the gui is
> still shown. There is a bug for it.
Yes, the only reason I added this was for our test suite. The scenario I
had in my head was that an applet is run with GUI (i.e. javaws _without_
-headless) and may or may not throw an exception. It would be easier to
parse this from stderr rather than going through the dialog.
Thanks for the reviews, I hope this clears things up.
More information about the distro-pkg-dev