• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class loader

 
Ranjith bala
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the different types classloader in Java?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
??
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.
 
Ranjith bala
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the following code

In test1.java ,I am loading the class "Test" and
calling method say().
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic