Forum Discussion
Did you import the class name where "idea" is package and "Execute" is class name:-
import com.idea.Execute
OR
import com.idea.* //To import all the classes
Then try this:-
Execute ex = new Execute(); //Add parameters based on requirements. ex.call() //where call() is method of Execute class
If it solved you problem. Please accept as solution and don't forget to give kudos.
avidCoder, I do not have any method in the class. It's the only main method I have in the class. I try doing this but it did not work
My java code looks like this
package project;
public class MyClass{
public static void main(String[] args) {
// performing some functionality here
}
}
Groovy script :
import project.MyClass;
MyClass sample = new MyClass();
sample.main(".abcd","Test","tom","pass");
It throws below error and I am not sure, Is this error coming because I am calling main method or any other issue
ERROR:java.lang.NoSuchMethodError: com.google.common.util.concurrent.SimpleTimeLimiter.create(Ljava/util/concurrent/ExecutorService;)Lcom/google/common/util/concurrent/SimpleTimeLimiter;