Mercurial > hg > icedtea7
changeset 1935:0a41b2f5f086
2009-07-07 Omair Majid <omajid@redhat.com>
* netx/net/sourceforge/jnlp/resources/Messages.properties: Add
RNestedJarExtration.
* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
(activateJar): Create parent directories for nested jars.
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Tue, 07 Jul 2009 10:12:31 -0400 |
parents | dd483ae1e6ca |
children | 559f19ce8d7b |
files | ChangeLog netx/net/sourceforge/jnlp/resources/Messages.properties netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java |
diffstat | 3 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jun 24 16:26:08 2009 -0400 +++ b/ChangeLog Tue Jul 07 10:12:31 2009 -0400 @@ -1,3 +1,10 @@ +2009-07-07 Omair Majid <omajid@redhat.com> + + * netx/net/sourceforge/jnlp/resources/Messages.properties: Add + RNestedJarExtration. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (activateJar): Create parent directories for nested jars. + 2009-06-24 Omair Majid <omajid@redhat.com> * netx/net/sourceforge/jnlp/security/CertWarningPane.java
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Jun 24 16:26:08 2009 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Jul 07 10:12:31 2009 -0400 @@ -111,6 +111,7 @@ RDenyStopped=Stopped applications have no permissions. RExitNoApp=Can not exit the JVM because the current application cannot be determined. RNoLockDir=Unable to create locks directory ({0}) +RNestedJarExtration=Unable to extract nested jar. RUnexpected=Unexpected {0} at {1} # Boot options, message should be shorter than this ---------------->
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Jun 24 16:26:08 2009 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Jul 07 10:12:31 2009 -0400 @@ -521,6 +521,10 @@ // with standard classloader methods) String extractedJarLocation = localFile.getParent() + "/" + je.getName(); + File parentDir = new File(extractedJarLocation).getParentFile(); + if (!parentDir.isDirectory() && !parentDir.mkdirs()) { + throw new RuntimeException(R("RNestedJarExtration")); + } FileOutputStream extractedJar = new FileOutputStream(extractedJarLocation); InputStream is = jarFile.getInputStream(je);