On Thu, Mar 18, 2010 at 11:16 PM,
<polinastya-groovy@yahoo.com> wrote:
Apparently, the class loader is null when the script is loaded from a java command line. It does not matter whether the JVM is 1.5 or 1.6.
Also, the classloader is not null because the script is loaded from a java command, it is null because the groovy class is loaded by the bootstrap class loader (because u use -Xbootclasspath/a:lib\groovy-all-1.7.1.jar). Here is the relevant javadoc of Class#getClassLoader() -
/**
* Returns the class loader for the class. Some implementations may use
* null to represent the bootstrap class loader. This method will return
* null in such implementations if this class was loaded by the bootstrap
* class loader.
*/