aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
diff options
context:
space:
mode:
authorOmair Majid <[email protected]>2012-03-14 11:27:16 -0400
committerOmair Majid <[email protected]>2012-03-14 11:27:16 -0400
commitbf89d620ace4a20270fee72285f9c4c9bfa6b345 (patch)
treebbeda7a0916ce754b66afaf0e98f1c2032722540 /netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
parent19038d58d1ee7981937a8de2014b9178d272e5cd (diff)
Launch errors are not being printed to terminal
2012-03-14 Omair Majid <[email protected]> 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.
Diffstat (limited to 'netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java')
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
index ab97eb2..3e70fe1 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java
@@ -196,9 +196,9 @@ public class JNLPRuntime {
if (handler == null) {
if (headless) {
- handler = new DefaultLaunchHandler();
+ handler = new DefaultLaunchHandler(System.err);
} else {
- handler = new GuiLaunchHandler();
+ handler = new GuiLaunchHandler(System.err);
}
}