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();
相关阅读
eclipse: The New Look Isn't Native请教一个JAVA编程问题有没有怎么配置jbuilder+jboss+tomcat的资料big paintbrush cursor?Java的中文读写问题java.sun.com down?请教:为什么死活连部上数据库?!is there any visual JSP developing ide???UnsupportedClassVersionError...How to write subset method?where to get struts 1.0?SUN是不是不提供java2 sdk documentation 下载了?parameters to main????再问个蠢问题,JAVA论坛W4T EclipseJava questions能这么 create thread 吗?了解行业现状,结识四方朋友,分享创业甘苦together for eclipse 里能否指定一个目录保存那些图Help! An Exception about JMS