English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

how to know the path + jar file used by the JVM to load a class in my program ?

2007-03-26 04:35:01 · 1 answers · asked by tomtomlehero 1 in Computers & Internet Programming & Design

1 answers

you could use getClass().getClassLoader().getResource(xxx).getFile()

where xxx is the name of the class file you want. That should give you back the path to the file including the jar it is in.

2007-03-26 04:39:23 · answer #1 · answered by Michael T 5 · 0 0

fedest.com, questions and answers