Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Where to define ur Custom Class Loader?

  1. #1
    Member
    Join Date
    Mar 2011
    Posts
    114
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Where to define ur Custom Class Loader?

    If i have created a custom class loader, where to configure the new custom class loader in JVM so that its being used when needed?


  2. #2
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: Where to define ur Custom Class Loader?

    If i have created a custom class loader, where to configure the new custom class loader in JVM so that its being used when needed?
    What do you mean? Can you elaborate it?

  3. #3
    Member
    Join Date
    Mar 2011
    Posts
    114
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Re: Where to define ur Custom Class Loader?

    If i have a customClass loader say by name "UserClassLoader". I have to specify somewhere so that UserClassLoader is used for loading the classes.
    I hope its clear now.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    21,865
    Thanks
    55
    Thanked 2,346 Times in 2,317 Posts

    Default Re: Where to define ur Custom Class Loader?

    One way to use your class loader is by calling its loadClass() method.

  5. #5
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: Where to define ur Custom Class Loader?

    Quote Originally Posted by tcstcs View Post
    If i have a customClass loader say by name "UserClassLoader". I have to specify somewhere so that UserClassLoader is used for loading the classes.
    I hope its clear now.
    Extend your custom loader class from ClassLoader and yes you have to specify it where you exactly want to load the class. It depends upon you where you want to load the class....

Similar Threads

  1. Class Loader question
    By tcstcs in forum Java Theory & Questions
    Replies: 2
    Last Post: January 17th, 2012, 11:24 PM
  2. Can't instantiate custom class
    By mwr76 in forum Object Oriented Programming
    Replies: 5
    Last Post: October 18th, 2011, 06:43 PM
  3. Replies: 6
    Last Post: July 18th, 2011, 09:48 AM
  4. [SOLVED] Class loader , InputStream-AudioStream (method) , returns an AudioStream Objet
    By chronoz13 in forum File I/O & Other I/O Streams
    Replies: 14
    Last Post: July 9th, 2011, 12:14 PM
  5. Custom Java stack class (with generics) problem
    By TBBucs in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 7th, 2010, 02:25 AM