JWhich in a line of code
Old skool java programmers will have almost certainly come across the tool JWhich (http://www.javaworld.com/javaworld/javatips/jw-javatip105.html). It's the classic tool for finding out which jar file contains a class. The following line of code has the same effect, and is slightly better than just trying to grep jar files.
com.ibm.websphere.management.AdminService.class. getClassLoader(). getResource( "com/ibm/websphere/management/AdminService.class");1
1 – after reading the source for JWhich I realised that I have just copied it exactly
↩
December 21st, 2008 at 12:20 pm
[...] beauty buys: clarins multi-active night cream First saved by KrazySteph14 | 14 days ago JWhich in a line of code First saved by kamiyra | 14 days ago Danger Daily News 8-31-08 First saved by SarahKate | 14 [...]