• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ClassLoaders

 
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
is there any possibility to see classes within System classloader?
I mean if it is possible from code.
Thanks
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by David Ulicny:
Hi,
is there any possibility to see classes within System classloader?
I mean if it is possible from code.
Thanks



What do u mean by "System ClassLoader"? Loading a class from an application in Tomcat or sthing? Could you elaborate more on what you mean by so-called System classloader?
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I mean this figure
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html
so this classloader which called there system.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
System classloaders are provided to Tomcat as JAR files... You may want to unjar them to see the classes inside them... And if the source codes are not available in the JAR files, you might want to use decompiler to decompiler them into Java source files...

BTW, may I know what you want to do with the system class loaders?

No one wants to dig into Tomcat internal class loaders like this... People just use them as they are in Tomcat...
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I only want to see what is loaded. Imagine that you have UnsatisfiedLinkError, so than you want to explore where are your classes loaded.
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by David Ulicny:
I only want to see what is loaded. Imagine that you have UnsatisfiedLinkError, so than you want to explore where are your classes loaded.



This link
Class Loader How-to

will help you.
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I mean this Java code


will it show to me the system classloader from that picture?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by David Ulicny:
I mean this Java code


will it show to me the system classloader from that picture?



You need to check the security manager's permission whether it is ok to access the system class loader or not... If not, the method will return null... You may want to check it out with the API to see how to achieve the things that you want from System Class Loader...

Just my 2 cents...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic