[RFC][icedtea-web] Launch errors are not being printed to terminal.

Jiri Vanek jvanek at redhat.com
Mon Mar 12 01:23:07 PDT 2012


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.
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.
>
>> diff --git a/netx/net/sourceforge/jnlp/DefaultLaunchHandler.java b/netx/net/sourceforge/jnlp/DefaultLaunchHandler.java
>> --- a/netx/net/sourceforge/jnlp/DefaultLaunchHandler.java
>> +++ b/netx/net/sourceforge/jnlp/DefaultLaunchHandler.java
>> @@ -101,6 +94,17 @@ public class DefaultLaunchHandler implem
>>               result.append(causes[i].getMessage());
>>               result.append(")");
>>           }
>> +
>> +        System.err.println(result);
>> +
>> +        // When isHeadless() is false, the message dialog would display the full
>> +        // stacktrace. To be consistent, display it when isHeadless() as well.
>> +        if (JNLPRuntime.isDebug() || JNLPRuntime.isHeadless()) {
>
> This if statement looks redundant. DefaultLaunchHandler is only used as
> the LaunchHandler in headless mode.
>
> Omair




More information about the distro-pkg-dev mailing list