HPCC-10204 Ensure that a contextClassLoader that uses the classpath is
available to Java classes.

Additionally, check for exceptions using a function call that does not create
local references in order to cut down on memory consumption.
Merge branch 'danchange'

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>