Skip to content

Instantly share code, notes, and snippets.

@tehbeard
Created March 18, 2013 14:27
Show Gist options
  • Save tehbeard/5187521 to your computer and use it in GitHub Desktop.
Save tehbeard/5187521 to your computer and use it in GitHub Desktop.
Getting package at runtime, (even if shaded to another package hopefully)
package foo.bar;
public class TestClass {
public static void main(String[] args){
//Get package at runtime
System.out.println(TestClass.class.getPackage().getName());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment