add support for adding jar files to CLASSPATH in framework

reviewed and cleaned up version of #866 by @JensTimmerman