从Java程序打开浏览器后的参数prefilled [英] open browser from java program with post parameter prefilled

查看:156
本文介绍了从Java程序打开浏览器后的参数prefilled的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java程序,在那里我可以打开Internet Explorer或任何浏览器。
。使用调用Runtime.getRuntime()EXEC(CMD);

I have a java program, where i can open a Internet Explorer or Any Browser. using Runtime.getRuntime().exec(cmd);

但我想从我的java程序提的URL和参数后打开浏览器。

But I want to open a browser from my java program mentioning url and post parameter.

首先,这可能吗?我怎样才能做到这一点?

First of all, is this possible? How can i achieve this?

推荐答案

您可以appled的URL,在IE中的命令行参数,例如:

You can appled the URL to the command line parameter for example in IE:

C:\Windows\System32>"C:\Program Files (x86)\Internet Explorer\iexplore.exe" http://stackoverflow.com/

火狐:

C:\Windows\System32>"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" stackov
erflow.com

和Chrome:

and Chrome:

C:\Windows\System32>"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
" stackoverflow.com

在Windows上运行,你就需要更换 C:\\ Windows \\ System32下>C:\\ Program Files文件(x86)的\\谷歌\\铬\\应用用的在您的环境中应用程序的位置

Works on windows, you will need to replace C:\Windows\System32>"C:\Program Files (x86)\Google\Chrome\Application with the the location of the application in your environment

这篇关于从Java程序打开浏览器后的参数prefilled的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆