public static void dumpEnvironment(Class<?> clss, java.io.PrintStream strm)
	{
		if (strm == null) strm = System.out;

		ClassLoader clssld = clss.getClassLoader();
		strm.println("Class=:"+clss);
		strm.println("ClassLoader="+clssld);
	
		java.security.Provider[] secproviders = java.security.Security.getProviders();
		strm.println("Secproviders="+(secproviders==null?-1:secproviders.length));
	    for (int idx = 0; secproviders != null && idx != secproviders.length; idx++) {
	    	strm.println("\tSecProvider="+secproviders[idx].getName()+" - "+secproviders[idx]);
	    }
		java.security.ProtectionDomain protdom = clss.getProtectionDomain();
		strm.println("ProtDom:"+protdom);

		java.security.Principal[] princips = protdom.getPrincipals();
		int cnt = (princips == null ? -1 : princips.length);
		strm.println("Principals="+cnt);
	    for (int idx = 0; idx != cnt; idx++) {
	    	strm.println("\tPrincipal="+princips[idx].getName()+" - "+princips[idx]);
	    }
		java.security.CodeSource codesrc = protdom.getCodeSource();
		strm.println("CodeLocation:"+codesrc.getLocation()+"\n\t"+clssld.getResource(clss.getCanonicalName()));
		strm.println("AbsDir: "+new java.io.File(".").getAbsolutePath());
		try {
			String path = new java.io.File(".").getCanonicalPath();
			strm.println("CanonPath: "+path);
		} catch (Exception ex) {
			strm.println("Failed to obtain CanonicalPath of current dir - "+com.grey.base.GreyException.summary(ex));
		}
		strm.println("java.class.path: "+System.getProperty("java.class.path"));
		strm.println("user.home: "+System.getProperty("user.home"));
		strm.println("Directory: "+new java.io.File(".").getAbsolutePath());
	}