AddClassPath method does not works with scriptlang="groovy"

groovy
code
scripting

#1
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="groovy">
	<script><![CDATA[
                addClassPath(new URL("jar:file:D:/encdecjar/common-utilities.jar!/"));
	]]></script>
    <export include-original-data="true"></export>
</config>

Why is above code not running when scriptlang=“groovy” ?
If I remove scriptlang=“groovy” it works fine.


#2

Hi Abhijeet,

addClassPath is not supported in groovy, it is a beanshell command - it is deprecated in Workfusion, and we don’t recommend using it. Please use groovy.

Follow this guide from our documentation for loading external jars
https://kb.workfusion.com/display/WF/Loading+external+JARs

And this helpful article