What's the best way to run a Java console app that...
# community-support
m
What's the best way to run a Java console app that uses
System.console()
? (It uses
System.console().readPassword()
.)
./gradlew run
NPEs because
System.console()
is null, even with the
--no-daemon
option. The best option I've found is to run
./gradlew installDist
and then run the
build/install/[module_name]/bin/[module_name]
script. Is there a better way to do it?
v
I don't think so. You would need https://github.com/gradle/gradle/issues/1251 being resolved.
--no-daemon
does not work as you still used a daemon. Nowadays the option in most cases just starts a one-off daemon that is quit after the build. If you would tweak the settings so that really no daemon is started, it would work