I have a groovy script source.groovy
#!/usr/bin/env runner
import groovy.sql.Sql
import my.package.MyJavaClass
def String NL = System.getProperty('line.separator')
I run groovy with parameters:
groovy --classpath C:/Projects/myproject/build/classes source.groovy
Where classes is an output folder where ant puts compiled java code. But groovy failse with error
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\Projects\myproject\src\groovy\source.groovy: 12: unable to resolve class my.package.MyJavaClass
@ line 12, column 1.
import my.package.MyJavaClass
^
1 error
Should I setup any additional parameters to import java files from groovy? Thanks!