Java objects can be created and accessed in DSQL.
Objects can be created with the new operator:
new
$file = new java.io.File("myfile");
if( $file.isFile("myfile") ) println "File $file exists";