Why Class.forName sucks!

BJ Hargrave (IBM Lotus)

OSGi DevCon · Short Talk
Presentation
Wednesday, 15:10, 10 minutes | Room 203/204 | Download in iCal Format

7
·
8
·
9
·
10
·
11
·
12
·
13
·
14
·
15
·
16
·
17
·
18
·
19

BJ Hargrave

Class.forName and ClassLoader.loadClass seem to be synonyms for the same basic operation: request a dynamic class load. Yet calling Class.forName does additional "checking" which is not very useful (certainly in OSGi). Class.forName does certain loader constraint checks to ensure type safety which are not necessary when doing dynamic class loads. This short talk will explore this issue and discuss a proposed "hack" to work around the issue for legacy code which can't easily be changed to avoid Class.forName.

BJ Hargrave is a Senior Technical Staff Member at IBM Lotus with over 20 years of experience as an IBM software architect and developer. His focus is small computer operating systems (kernels, file systems, development tools, application binary interface specifications) and Java technology. He holds multiple patents for JVM performance improvements and is the IBM expert and lead architect for OSGi technologies. BJ holds a Bachelor of Science in Computer Science from Rensselaer Polytechnic Institute and a Master of Science in Computer Science from the University of Miami. BJ has been a leader in the development of the OSGi technology since its inception and was named an OSGi Fellow in 2002 for his technical contributions and leadership in the OSGi Alliance. He is currently CTO of the OSGi Alliance and chair of the OSGi Core Platform Expert Group. BJ is also a committer on the Eclipse Equinox project.

Floor Plan

Gold sponsors

BEA logo

IBM logo

Wind River logo

Replay Solutions logo

JBoss logo

SOPERA logo

Cloudsmith logo

BIRT Exchange logo

Skyway Software logo

Oracle

BlackBerry logo

AMD logo

Silver sponsors

Sybase

Google

Genuitec

Instantiations

Teamprise

Telelogic

Innoopract

Business Objects

LynuxWorks logo

Hardware sponsor

AMD logo

Media sponsors

Extension Media

Methods and Tools

ACM

Addison-Wesley logo

SD Times logo

Open Systems Publishing

Software Test & Performance logo

SDForum

Be a Sponsor