g*g
2 楼
Runtime.getRuntime.exec()
firefox http://www.google.com.
【在 p***p 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: IE或者FF,而且打开一个指定地链接
firefox http://www.google.com.
【在 p***p 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: IE或者FF,而且打开一个指定地链接
p*p
3 楼
Runtime.getRuntime().exec(
"C:\.......\iexploer.exe");
对不对,请问如何指定路径呢
【在 g*****g 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: Runtime.getRuntime.exec()
: firefox http://www.google.com.
p*p
7 楼
是在Eclipse里面用运行的,用ANT编译。请问是不是要选择run-windows?
try {
Runtime.getRuntime().exec("iexplorer.exe "+httpURI);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
错误信息如下
[java] java.io.IOException: CreateProcess: iexplorer.exe
http://localhost:8080/CallCenter/CustomerSipSelect;ApplicationSessionID=111160
931956213782591?employeeID=5&kundensip=sip:p***[email protected] error=2
[java] at java.lang.Win32Process.create(Native Method)
[java] at
【在 s*******d 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 建议只写iexplorer.exe,因为通常情况下ie是放在系统路径里的.
m*t
8 楼
It's "iexplore.exe" without the 'r'. And it's not by default on
the system path. People(the normal, innocent, ignorant, and
ever-demanding End Users, that is) don't start IE by typing it on
the command line, so it doesn't need to be on the path.
【在 p***p 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
:
: 是在Eclipse里面用运行的,用ANT编译。请问是不是要选择run-windows?
: try {
: Runtime.getRuntime().exec("iexplorer.exe "+httpURI);
: } catch (IOException e) {
: // TODO Auto-generated catch block
: e.printStackTrace();
: }
: 错误信息如下
: [java] java.io.IOException: CreateProcess: iexplorer.exe
g*g
9 楼
yep, it's better to use the default path, and throw an error
ask user to specify if you can' find it.
Or read registry.
【在 m******t 的大作中提到】![](/moin_static193/solenoid/img/up.png)
:
: It's "iexplore.exe" without the 'r'. And it's not by default on
: the system path. People(the normal, innocent, ignorant, and
: ever-demanding End Users, that is) don't start IE by typing it on
: the command line, so it doesn't need to be on the path.
ask user to specify if you can' find it.
Or read registry.
【在 m******t 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
:
: It's "iexplore.exe" without the 'r'. And it's not by default on
: the system path. People(the normal, innocent, ignorant, and
: ever-demanding End Users, that is) don't start IE by typing it on
: the command line, so it doesn't need to be on the path.
w*f
10 楼
还是用现成的吧, 考虑更周全些。
http://ostermiller.org/utils/Browser.java.html
【在 m******t 的大作中提到】![](/moin_static193/solenoid/img/up.png)
:
: It's "iexplore.exe" without the 'r'. And it's not by default on
: the system path. People(the normal, innocent, ignorant, and
: ever-demanding End Users, that is) don't start IE by typing it on
: the command line, so it doesn't need to be on the path.
http://ostermiller.org/utils/Browser.java.html
【在 m******t 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
:
: It's "iexplore.exe" without the 'r'. And it's not by default on
: the system path. People(the normal, innocent, ignorant, and
: ever-demanding End Users, that is) don't start IE by typing it on
: the command line, so it doesn't need to be on the path.
p*p
11 楼
多谢了,DEMO时候出了小丑。本来用IE工作,弹出的
窗口却是FF的,当时就笑场了
Runtime.getRuntime().exec("iexplorer.exe "+httpURI);
【在 w***f 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 还是用现成的吧, 考虑更周全些。
: http://ostermiller.org/utils/Browser.java.html
窗口却是FF的,当时就笑场了
Runtime.getRuntime().exec("iexplorer.exe "+httpURI);
【在 w***f 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 还是用现成的吧, 考虑更周全些。
: http://ostermiller.org/utils/Browser.java.html
p*p
18 楼
It works fine for me, I use following code to open a default Browser.
For windows:
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
It open a new Browser Process for every URL, have to shut down one by one. Now
After opening a browser, the following urls will be launched in the same
browser.
So first:
public static Process launchURL(Process p, String url)
if (p==null) {
p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " +
url);
} else {
?
【在 b*****o 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: String[] command ={"cmd.exe","/c","C:\\Program Files\\Internet Explorer\\IEXPL
: ORE.EXE","","" };
: Process proc = Runtime.getRuntime().exec(command);
: proc.waitFor();
For windows:
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
It open a new Browser Process for every URL, have to shut down one by one. Now
After opening a browser, the following urls will be launched in the same
browser.
So first:
public static Process launchURL(Process p, String url)
if (p==null) {
p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " +
url);
} else {
?
【在 b*****o 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: String[] command ={"cmd.exe","/c","C:\\Program Files\\Internet Explorer\\IEXPL
: ORE.EXE","","" };
: Process proc = Runtime.getRuntime().exec(command);
: proc.waitFor();
相关阅读
Re: weblogic,有网址吗?Talk a little more about How to lock a file更好的使用googleBoundary checking & robustnessRe: How to lock a file and detect a thread is over?database connection poolJava questions 51-100Re: Need Emergent help for Java I/O!J2EE good stuffs sharing FTP Server SetupRe: 关于APPLET的IO问题Java interview questions赛车游戏。Re: Java Tip: Constant[转载] Hehe, 俺们不抢TAR的生意....possible soluctionJava question 101-150A nice EJB server(recommend)Re: 新生上路Re: How to distinguish Mouse Right-click and left-clRe: (I mean in java)Re: Help! Anyone have the experience extracting te