24
Jan
10

finding out which jar a class comes from



If you ever need to know from what jar file a class originates, this line can help you:


 System.out.println(SomeClass.class.getProtectionDomain().
                getCodeSource().getLocation());

Advertisements

1 Response to “finding out which jar a class comes from”


  1. 1 Sandeep Bhalerao
    March 29, 2010 at 20:57

    Awesome !!!

    -Sandeep


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Blog Stats

  • 223,799 hits

%d bloggers like this: