Getting the Package of an Object Package pkg = object.getClass().getPackage(); String pkgName = pkg.getName();