From bf89d620ace4a20270fee72285f9c4c9bfa6b345 Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Wed, 14 Mar 2012 11:27:16 -0400 Subject: Launch errors are not being printed to terminal 2012-03-14 Omair Majid Print exceptions to terminal when running in gui mode too. * netx/net/sourceforge/jnlp/AbstractLaunchHandler.java: New file. * netx/net/sourceforge/jnlp/DefaultLaunchHandler.java: Extend AbstractLaunchHandler. (DefaultLaunchHandler): New method. (printMessage): Moved to parent class. * netx/net/sourceforge/jnlp/GuiLaunchHandler.java: Extend AbstractLaunchHandler. (GuiLauchHandler): New method. (launchError): Print the error too. (launchWarning,validationError): Call parent's printMessage. * netx/net/sourceforge/jnlp/LaunchException.java: Use standard java exception chaining. This removes compatibility with pre-java 1.3 class libraries. (LaunchException(JNLPFile,Exception,String,String,String,String)): Pass cause to parent so exceptions are chanined properly. (LaunchException(String,Throwable),LaunchException(Throwable)): Call parent's constructor. (printStackTrace(PrintStream),printStackTrace(PrintWriter),getCause): Removed. Use parent's implementation instead. (getCauses): Removed. * netx/net/sourceforge/jnlp/LaunchHandler.java (validationError): Rename argument to clarify meaing. * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): Redirect output of all handlers to System.err. * plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java (PluginAppletSecurityContext): Likewise. * tests/netx/unit/net/sourceforge/jnlp/DefaultLaunchHandlerTest.java, * tests/netx/unit/net/sourceforge/jnlp/LaunchExceptionTest.java: New file. Contains tests. --- plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java') diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java b/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java index 7086b08..402fa99 100644 --- a/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java +++ b/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java @@ -243,7 +243,7 @@ public class PluginAppletSecurityContext { // that JNLPRuntime will try to install if (System.getSecurityManager() == null) { JNLPRuntime.initialize(/* isApplication */false); - JNLPRuntime.setDefaultLaunchHandler(new DefaultLaunchHandler()); + JNLPRuntime.setDefaultLaunchHandler(new DefaultLaunchHandler(System.err)); } JNLPRuntime.disableExit(); -- cgit v1.2.3