大家好,我有一个应该从java程序完成的要求。要求如下,
1.Connect to an SSH enabled unix machine
2.Login to sqlplus on the unix machine
3.execute sqlplus commands
4.Come out.
我能够完成前两个任务,但我不知道完成3& 3中的任务。 4分。任何帮助将不胜感激
答案 0 :(得分:0)
在您发布的代码段中,将command1 var设置为
String command1= "echo 'SELECT 1 FROM DUAL;' | sqlplus user/password@tnsname";