wood burning stoves 2.0*
The moose likes Java in General and the fly likes Class loader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Class loader" Watch "Class loader" New topic
Author

Class loader

Ranjith bala
Greenhorn

Joined: Jul 24, 2002
Posts: 3
What are the different types classloader in Java?
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
??
Well the classes that ship with the jdk are
ClassLoader
SecureClassLoader
URLClassLoader
and RMIClassLoader

The bootstrap ClassLoader that is used by the JVM that Sun provides is sun.misc.Launcher$AppClassLoader which is a subclass of URLClassLoader.
But of course YOU can subclass any of these and create your OWN class loader.
Sun has a ClassLoader Tutorial that you might want to review.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Ranjith bala
Greenhorn

Joined: Jul 24, 2002
Posts: 3
Thanks cindy.
Suppose i have a class name in as String like
String str="ex".
Now i want to create the class for that name("ex"),and instant for that.I think these involves class loading .So i want to know how to load that class in the name specified as String.
Is it possible?
Snigdha Solanki
Ranch Hand

Joined: Sep 07, 2000
Posts: 128
See the following code

In test1.java ,I am loading the class "Test" and
calling method say().


Snigdha<br />Sun Certified Programmer for the Java™ 2 Platform
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Class loader