Invoke Java method Failed

Do I have to define maven project with dependency?