diff options
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); |