Scanner not working in Geany Compiler (but works in Terminal)

Hello Everyone.
I’ve recently joined Codecademy and I’m a complete beginner (last time I tried coding was 15 years ago with Turbo Pascal but decided to try to learn Java now).
To wrap up Java lessons I’ve been taking here I’m attempting to make a simple program, but when I use Scanner input I get the following error. (I am using Geany on Linux Manjaro to compile and run code. There seems to be a problem with my set up of Geany compiler.)

" Exception in thread “main” java.util.NoSuchElementException: No line found
at java.base/java.util.Scanner.nextLine(Scanner.java:1656)
at ITQuizTerminal.main(ITQuizTerminal.java:23)"

When I run the program in Terminal (both system terminal and Geany terminal, everything is OK, but when I run it in compiler in Geany, this error occurs).

Probably this is not a strictly java related problem but rather an issue with Geany setup but I’m not sure.
Could anyone please let me know what I’m doing wrong?
Thanks!

Compiler: