Hi,
I start my code with this sample : https://developer.cisco.com/site/axl/learn/how-to/axl-java-sample-application.gsp
The problem I met is that, for example, when I ran the command "java -cp . com.cisco.axl.shn.AUBV" in shell directly, everything went well, but when I put the command in a shell file, like "upgradeBEV.sh" which is triggered by another server, System.console() sometimes
returns null. The code about the console is :
| //verify JVM has a console |
Console cons = System.console();
if(cons == null){
| System.err.println("The Cisco AXL Sample App requires a console."); |
| System.exit(1); |
} else {
| AUBV.informUser("%nWelcome to Alpha Daily Upgrade Tool.%n"); |
}
Sometimes more than one java are triggered, the time interval is about ten minutes, then some application could get the console while others could not. Seems AXL requires the console... I'm using centOS 6.5 to run the script. How can I fix this problem? I'd like to run serveral scripts at the same time (or with minutes apart). Are there any ways to get multiple consoles?
Thanks,
Jialing