diff options
author | Kenneth Russel <[email protected]> | 2007-07-20 23:59:42 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-07-20 23:59:42 +0000 |
commit | 1d260119d250f3e53f2fa886b224f3e402ea8d82 (patch) | |
tree | 7968d0a7132c0fbc0fe6da6757ba6f5b3ed8f17f /www | |
parent | 8ef7b6b277d4c527db269b573d20ebd08632a75e (diff) |
Incorporated suggestion from Brian Burkhalter from JAI team to try to
propagate out UnsatisfiedLinkError instead of RuntimeException from
recommended loadLibraryInternal method
Diffstat (limited to 'www')
-rw-r--r-- | www/index.html | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/www/index.html b/www/index.html index f5a15ad..c83ea72 100644 --- a/www/index.html +++ b/www/index.html @@ -492,6 +492,7 @@ String sunAppletLauncher = System.getProperty("sun.jnlp.applet.launcher"); boolean usingJNLPAppletLauncher = Boolean.valueOf(sunAppletLauncher).booleanValue(); + if (usingJNLPAppletLauncher) { try { Class jnlpAppletLauncherClass = @@ -501,7 +502,17 @@ new Class[] { String.class }); jnlpLoadLibraryMethod.invoke(null, new Object[] { libraryName }); } catch (Exception e) { - throw new RuntimeException(e); + Throwable t = e; + if (t instanceof InvocationTargetException) { + t = ((InvocationTargetException) t).getTargetException(); + } + if (t instanceof Error) + throw (Error) t; + if (t instanceof RuntimeException) { + throw (RuntimeException) t; + } + // Throw UnsatisfiedLinkError for best compatibility with System.loadLibrary() + throw (UnsatisfiedLinkError) new UnsatisfiedLinkError().initCause(e); } } else { System.loadLibrary(libraryName); |