aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2013-06-20 17:00:52 +0200
committerJiri Vanek <[email protected]>2013-06-20 17:00:52 +0200
commit70371886c351800a6fad9bad17777179af2d8584 (patch)
tree5fa59db9ff4e9172838dad7112c63bb62080e452 /netx/net/sourceforge/jnlp
parent1829a343309c767b0a07fd918e19a04f481a18f9 (diff)
Removed out-of date Boot13 class
Diffstat (limited to 'netx/net/sourceforge/jnlp')
-rw-r--r--netx/net/sourceforge/jnlp/runtime/Boot.java3
-rw-r--r--netx/net/sourceforge/jnlp/runtime/Boot13.java98
2 files changed, 0 insertions, 101 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/Boot.java b/netx/net/sourceforge/jnlp/runtime/Boot.java
index f6d76d0..9b69660 100644
--- a/netx/net/sourceforge/jnlp/runtime/Boot.java
+++ b/netx/net/sourceforge/jnlp/runtime/Boot.java
@@ -171,9 +171,6 @@ public final class Boot implements PrivilegedAction<Void> {
JNLPRuntime.setInitialArgments(Arrays.asList(argsIn));
- // do in a privileged action to clear the security context of
- // the Boot13 class, which doesn't have any privileges in
- // JRE1.3; JRE1.4 works without Boot13 or this PrivilegedAction.
AccessController.doPrivileged(new Boot());
}
diff --git a/netx/net/sourceforge/jnlp/runtime/Boot13.java b/netx/net/sourceforge/jnlp/runtime/Boot13.java
deleted file mode 100644
index f33e7ae..0000000
--- a/netx/net/sourceforge/jnlp/runtime/Boot13.java
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2001-2003 Jon A. Maxwell (JAM)
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-package net.sourceforge.jnlp.runtime;
-
-import java.lang.reflect.*;
-import java.net.*;
-import java.security.*;
-
-/**
- * Allows a Policy and SecurityManager to be set in JRE1.3 without
- * running the code with only applet permissions; this class is
- * for backward compatibility only and is totally unnecessary if
- * running in jdk 1.4 or later (can call Boot directly).
- *
- * @author <a href="mailto:[email protected]">Jon A. Maxwell (JAM)</a> - initial author
- * @version $Revision: 1.5 $
- */
-public class Boot13 extends URLClassLoader {
-
- // The problem with setting a Policy in jdk1.3 is that the
- // system and application classes seem to be loaded in such a
- // way that only their protection domain determines the
- // permissions; the policy object is never asked for permissions
- // after the class is loaded. This hack creates a classloader
- // that loads duplicate versions of the classes in such a
- // manner where they ask with the policy object. The jdk1.4
- // correctly honors the Policy object making this unneccessary
- // post-1.3.
-
- private Boot13(URL source[]) {
- super(source);
- }
-
- protected PermissionCollection getPermissions(CodeSource source) {
- Permissions result = new Permissions();
- result.add(new AllPermission());
-
- return result;
- }
-
- public Class loadClass(String name) throws ClassNotFoundException {
- Class c = findLoadedClass(name);
- if (c != null)
- return c;
-
- // reverse the search order so that classes from this
- // classloader, which sets the right permissions, are found
- // before the parent classloader which has the same classes
- // but the wrong permissions.
- try {
- return findClass(name);
- } catch (ClassNotFoundException ex) {
- }
-
- return getParent().loadClass(name);
- }
-
- public static void main(final String args[]) throws Exception {
- URL cs = Boot13.class.getProtectionDomain().getCodeSource().getLocation();
- // instead of using a custom loadClass search order, we could
- // put the classes in a boot/ subdir of the JAR and load
- // them from there. This would be an improvement by not
- // allowing applications to get a duplicate jnlp engine (one
- // with applet access permissions) by using the system
- // classloader but a drawback by not allowing Boot to be
- // called directly.
- //cs = new URL("jar:"+cs+"!/boot/");
-
- if (cs == null) {
- System.err.println("fatal: cannot determine code source.");
- System.exit(1);
- }
-
- Boot13 b = new Boot13(new URL[] { cs });
-
- Thread.currentThread().setContextClassLoader(b); // try to prevent getting the non-policy version of classes
-
- Class<?> c = b.loadClass("net.sourceforge.jnlp.runtime.Boot");
- Method main = c.getDeclaredMethod("main", new Class<?>[] { String[].class });
-
- main.invoke(null, new Object[] { args });
- }
-
-}