| Author |
any way to find out the physical location of the class file at runtime?
|
chris
Greenhorn
Joined: Mar 18, 2003
Posts: 14
|
|
hi, I wanna know there is a way to find out the physical location of the class file at runtime?? I tried "(new File(".")).getCanonicalPath()", but it returns only the "root" directory of where "javaw" is executed: "/user/domains/mydomain" what I need is something like: "/user/my_project/webapp/WEB-INF/classes/test/framework/testClass"!! appreciate any help!
|
 |
Jean-Francois Briere
Ranch Hand
Joined: Mar 03, 2004
Posts: 101
|
|
I wonder why you want that kind of information. The Java class may be a file located in a zip, jar, war, ear, folder or else or could even not be a file at all. Anyway you could try something like this: Regards
|
 |
 |
|
|
subject: any way to find out the physical location of the class file at runtime?
|
|
|