Class c = VMSecurityManager.getClassContext()[1]; ClassLoader cl = c.getClassLoader();    return cl != null ? cl.getPackages() : new Package[0];
ClassLoader cl = VMStackWalker.getCallingClassLoader(); return cl != null ? cl.getPackages() : VMClassLoader.getPackages();
  public static Package[] getPackages()  {		// Get the caller's classloader    Class c = VMSecurityManager.getClassContext()[1];		ClassLoader cl = c.getClassLoader();		// Sun's implementation returns the packages loaded by the bootstrap		// classloader if cl is null, but right now our bootstrap classloader		// does not create any Packages.		return cl != null ? cl.getPackages() : new Package[0];	}