-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.1.4
-
x86
-
windows_95
Name: dsC58869 Date: 10/21/97
The method java.beans.Beans.instantiate(ClassLoader cl, String beanName)
works wrong instantiating an applet with system class loader under Windows95.
This bug was introduced in JDK1.1.4.
==== Here is the test demonstrating the bug ====
--- SimpleApplet.java ---
import java.applet.*;
public class SimpleApplet extends Applet{}
--- --- --- --- --- ---
--- Test.java ---
import java.beans.*;
import java.applet.*;
public class Test{
public static void main(String[] args){
Test test = new Test();
}
Test(){
String bname = "SimpleApplet";
Class bclass = SimpleApplet.class;
SimpleApplet bean;
try {
ClassLoader cl = this.getClass().getClassLoader();
bean = (SimpleApplet) Beans.instantiate(cl, bname);
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
--- --- --- ---
==== Here is the output of the test ====
C:\home\sda\tmp>java Test
java.net.MalformedURLException: systemresource:/FILE./+/: java.lang.SecurityExce
ption: systemresource:/FILE./+/ refers to a non system resource
at java.net.URL.<init>(URL.java:372)
at java.net.URL.<init>(URL.java:254)
at java.beans.Beans.instantiate(Beans.java:177)
at Test.<init>(Test.java:14)
at Test.main(Test.java:6)
======================================================================
======================================================================
- duplicates
-
JDK-4080478 system resource lookup fails in Beans.instantiate()
-
- Closed
-