Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Advanced-java] Origin of a Class
- From: Mahesh" <maheshg@xxxxxxxxx (Mahesh)
- Subject: [Advanced-java] Origin of a Class
- Date: Wed, 13 Mar 2002 15:06:48 -0500
If given an instance of Object, is there a way to find out the URL from which it was loaded ? Object obj = new Object(); You can find the classloader for this object, from obj.getClass().getClassLoader(); So i can find out whether it was loaded by the system classloader or URLClassLoader or ... Can you go further than this ? Is there a way to pinpoint the jar file from which the class was loaded ? Also is there a way to find out the "classpath" through JNI ? thanks Mahesh
- Follow-Ups:
- [Advanced-java] Origin of a Class
- From: Rimvydas Vaidelis
- [Advanced-java] Origin of a Class
- References:
- [Advanced-java] aliasing charsets
- From: kevin graham
- [Advanced-java] aliasing charsets
- Prev by Date: [Advanced-java] aliasing charsets
- Next by Date: [Advanced-java] Origin of a Class
- Previous by thread: [Advanced-java] aliasing charsets
- Next by thread: [Advanced-java] Origin of a Class
- Index(es):