I wanted to run some of the class files present inside build/install/ folder. So, I have created task like below.
Note : dummy java class present inside build/install/dummy.class
task runWithExec(type: JavaExec) {
workingDir = "$buildDir/install/"
//classpath = files("$buildDir/install/lib")
main = 'dummy'
}
but, when i execute this task, I am getting exception saying, ‘Error: Could not find or load main class dummy’
why i am getting such a exception when i am setting my workingDir properly.