Code for Groovy
def param=[]
param+="paramater 1"
param+="paramater 2"
param+="paramater 3"
param+="paramater 4"
def stringArgForJava = (String[])params
Test.callJavaClass(stringArgForJava) //static method
The sample java class is as follow;
class Test
{
public static void callJavaClass(String[] arg)
{
for(int i=0;i {
System.out.println("params "+i ":" +params[i]);
}
}
}