两个Runtime.getRuntime().exec()的问题

maxy 2004-10-11 10:00:03
One.手工创建数据库时
通过oradim.exe命令,在服务里生成一个新的实例管理服务,启动方式为手工
1: set ORACLE_SID=test
2: D:\Oracle\Ora81\bin\oradim -new -sid test -startmode manual -pfile "D:\Oracle\admin\test\pfile\inittest.ora"

Runtime.getRuntime().exec(1);
System.out.println("set");
Runtime.getRuntime().exec(2);

"set"没有出现,是执行“set ORACLE_SID=test”的问题吗?


Two.连接Oacle
1:svrmgrl
2:connect INTERNAL/oracle
3:@D:\Oracle\createtemp.sql

Runtime.getRuntime().exec()怎样写,如果分开写就不能再同一个进程里执行。
...全文
159 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yugan 2005-01-31
  • 打赏
  • 举报
回复
很抱歉,看不懂,是JBUILDER的数据库连接问题吗?
我也是初学者。
lxleaves 2005-01-31
  • 打赏
  • 举报
回复
exec用批处理合并操作
exec("cmd /c aa.bat")
YuLimin 2005-01-31
  • 打赏
  • 举报
回复
http://www.wiley.com/legacy/compbooks/daconta/mjp/sourcecode.html
cyicecream 2004-11-09
  • 打赏
  • 举报
回复
Runtime.getRuntime().exec("cmd /c " + oradim.exe的路径 + "set ORACLE_SID=test");

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧