I am writing a console application with Java and gradle. In my java application i am trying to accept input from the user. It is working without any issue if i run via eclipse IDE. But if i run from command line it is not stopping to accept user input. Here is the build.gradle file. Here is link which says to add run { standardInput = System.in } but still i could not succeed.
sourceSets {
generated {
java {
srcDir 'src/generated/java'
}
resources {
srcDir 'src/generated/resources'
}
}
main {
compileClasspath += sourceSets.generated.runtimeClasspath
}
test {
compileClasspath += sourceSets.generated.runtimeClasspath
//System.setProperty('easy', 'false')
}
run {
standardInput = System.in
}
}