g*g
2 楼
Runtime.getRuntime.exec()
firefox http://www.google.com.
【在 p***p 的大作中提到】
: IE或者FF,而且打开一个指定地链接
firefox http://www.google.com.
【在 p***p 的大作中提到】
: IE或者FF,而且打开一个指定地链接
p*p
3 楼
Runtime.getRuntime().exec(
"C:\.......\iexploer.exe");
对不对,请问如何指定路径呢
【在 g*****g 的大作中提到】
: 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 的大作中提到】
: 建议只写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 的大作中提到】
:
: 是在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 的大作中提到】
:
: 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 的大作中提到】
:
: 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 的大作中提到】
:
: 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 的大作中提到】
:
: 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 的大作中提到】
: 还是用现成的吧, 考虑更周全些。
: http://ostermiller.org/utils/Browser.java.html
窗口却是FF的,当时就笑场了
Runtime.getRuntime().exec("iexplorer.exe "+httpURI);
【在 w***f 的大作中提到】
: 还是用现成的吧, 考虑更周全些。
: 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 的大作中提到】
: 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 的大作中提到】
: String[] command ={"cmd.exe","/c","C:\\Program Files\\Internet Explorer\\IEXPL
: ORE.EXE","","" };
: Process proc = Runtime.getRuntime().exec(command);
: proc.waitFor();
相关阅读
给facebook编程是怎么个意思?Eclipse export,有javaws的时候如何设置Free MongoDB courses (https://education.10gen.com/courses)谁能说说Perm Gen Size太大有什么坏处?大家android编程,在哪儿用web service fetch股票历史信息,loAmex Blue Cash preferred 6% Cashback+$150bonus超市专用信用卡好虫,exploit等大牛请进--关于htmlunit看了zhaoce073大水忍不住说2句Re: 要不要跳ASP.net and C# 坑? (转载)本菜对EJB一问请问各位(巨,大,中,小,微,不)牛问一下Houston有ICC吗,打算学Java码农们站出来, 讨论个技术问题, 一般的web site真的能获取mac (转载)IntelliJ IDEA 12 is releasedMicrosoft augments JavaScript for large-scale developmentAmex SPG卡送25K points 免费送500刀现金 最佳酒店卡$10 gift from Rebtel! 万圣节奖励冲10刀送10刀,Rebtel电话卡大促销htmlunit中的classpath问题,总是找不到packageFinished Scala course at Courserahtmlunit及多线程问题