History

Fixed javal tool to load system java classes

Dmitry Kabak (userdima committed 13 years ago

Commit 54574481 parent 464f58b2 files · +6 −-1Browse files

Showing the changes to java (2 of 2 files). Show all

Unified · Split

2 files
  1. java/tools/javal/TargetLoader.class +0 −0
  2. java/tools/javal/javal.java +7 −0
java/tools/javal/TargetLoader.class+0−0

Binary file not shown.

java/tools/javal/javal.java+7−0
@@ -205,6 +205,13 @@ class TargetLoader extends ClassLoader · 204 unmodified lines
205205 return( findSystemClass( name ) );
206206 }
207207
208+ if ( name.startsWith("java/") )
209+ {
210+ System.out.println( "Warning: we can't load " + name + " due to java security policy" );
211+ System.out.println( "Warning: we will use the system (already loaded) class instead" );
212+ return( findSystemClass( name.replaceAll("/", ".") ) );
213+ }
214+
208215 // otherwise do our one time load from a disk file
209216
210217 // read from the current directory the file "name".java