When I’m doing client / server development, I find it useful to use System.in.read() to wait for user input. For example:
public class Main {
public static void main(String[] args) throws Exception {
System.out.println("Press enter key to stop.");
System.in.read();
}
}
When I run the above from my IDE (IntelliJ IDEA), it blocks. However, when I run it with Gradle’s application plugin, the process exits immediately. I’m not sure why. Any ideas?
I’ve seen GRADLE-1147 and GRADLE-1168, but they seem to be related to getting input for build scripts.