Bug 514 : Use getContextClassLoader() instead of Class.forName()
Last modified: 2007-02-06 18:16




Status:
RESOLVED
Resolution:
LATER -
Priority:
P2
Severity:
normal

 

Reporter:
stone
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2007-02-06 18:08
http://dev.processing.org/source/index.cgi/trunk/processing/core/src/processing/core/PApplet.java?view=markup

in PApplet:6605 (r3047) it uses
Class c = Class.forName(name);

This is old style coding, and now following is propper
Class c = Thread.currentThread().getContextClassLoader().loadClass(name);

because the first one will not work in the situation where there are some
class loaders.
Additional Comment #1 From fry 2007-02-06 18:16
we'll only be making the switch on this if we decide to give up support for
Java 1.1 permanently. for the time being, it hasn't caused any reported
problems.