When i run the code inside IntelliJ IDEA it works perfectly but if i try running it from terminal with "gradlew run" it prints the question but doesn't give me the chance to type anything. It immediately prints "Hello null by Gradle" and finishes the run. Does anyone know why it does like this?
public static void main(String[] args) throws IOException {
System.out.println("What's your name?");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String name = br.readLine();
System.out.println("Hello " + name + " By Gradle");
br.close();
}
I create this project with the task "gradle init" i chose application, Java, Groovy, JUnit Juppiter.