OOPSLA '04

Program
Technical Program
  Invited Speakers
  Technical Papers
  Onward!
  Panels
  Practitioner Reports
  Tutorials
Workshops
DesignFest
Educators' Symposium
Demonstrations
Posters
Doctoral Symposium
Exhibits
Student Research Comp.
FlashBoF
 
Turing Lecture
 
Social Events
 
Week at a Glance
 
Final Program (1.5M .pdf)

Find in Program
 

Page
Printer-friendly

Basket
view, help

"Class Loading in Java: Building Dynamic Systems Without Pain"
Object-Oriented Programming, Systems, Languages and Applications
Home    Program    Housing & Transportation    Registration    Submissions    Wiki    Maps
 
  > Technical Program > Tutorials > All Tutorials

 : Monday Afternoon Tutorials (1:30 - 17:00) : Languages and Development : Monday

Class Loading in Java: Building Dynamic Systems Without Pain

Meeting Room 7
Monday, 13:30, half day
 


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

Justin Gehtland, Relevance:  Justin Gehtland, Founder/Partner, Relevance: Justin Gehtland is a founding partner of Relevance, an organization dedicated to elevating the practice of software development. Before starting Relevance, Justin was an instructor and Director of Informations Systems at DevelopMentor where he taught and wrote in the COM, .NET and Internet Systems curricula. Justin is co-author on several books (Better, Faster, Lighter Java with Bruce Tate, and Windows Forms Programming in Visual Basic.NET with Chris Sells are the most recent) and is the Agile Development columnist for The Server Side.

Tutorial number: 38

One of Java's greatest strengths is its flexible deployment model. In this session you will learn how Class Loaders facilitate deployment, and how to troubleshoot J2EE Class Loading problems. We begin with the class loading model provided by the java launcher, including the classpath, extensions path, and bootstrap path. Next, we will see how J2EE, Ant, browsers, and other containers extend this model, using URLClassLoader to dynamically load new classes at runtime. These techniques allows side-by-side deployment of multiple versions of the same (or modified) classes, without shutting down the Java virtual machine.

Java containers use Java Class Loaders to make all this deployment power transparent to the application developer. The amazing thing is that it works—almost. But when class loading goes wrong, the symptoms can be totally bizarre. We will explain how to diagnose the following symptoms:

  1. Inability to see recent changes to a class
  2. NoClassDefFoundErrors when the class seems to be in the right place
  3. ClassCastExceptions between two instances of the "same" class
  4. Linkage errors

We will also look at how various applications hack class loading, and the problems that these hacks cause:

  1. Post-delegating loaders
  2. The Endorsed Standards Override Mechanism
  3. The -Xbootclasspath flags

Intermediate: Target audience: All Java programmers need to understand Class Loaders. Prerequisites: Six months experience programming in Java.