I’m trying to use the System.console() from within my gradle script. All seems to be working fine EXCEPT when I am using the org.gradle.java.home property. If I have that set to switch to a different jvm then I get null as a return from System.console().
The reason I need to switch jvms is because I’m on a 64-bit machine. One of my tasks interacts with the Starteam ant tasks, which basically farms out the work as a native library to the Starteam client. The Starteam client libraries are only 32-bit, so when I need to run those specific tasks I use the org.gradle.java.home property to switch to a 32-bit jdk. When I do this System.console() also stops working.
I even tried ant’s input task, which does still seem to work, except for the SecureInputHandler (I am reading a username & password). When I use ant’s input task the password still echos to the screen.
Is there a workaround for this?