2012-07-25 65 views

回答

0

可以appled網址在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:

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

在Windows上運行,你需要在你的環境中應用程序的位置,以取代C:\Windows\System32>"C:\Program Files (x86)\Google\Chrome\Application

0

對此,您無能爲力。除非您打開的瀏覽器有一些可用的命令行參數(您必須查看它們,並且它們將是瀏覽器特定的),否則您將無法執行此操作。

可能我建議使用Java的瀏覽器窗口:

SWT Browser對象有一個相當大的API,並使用原生瀏覽器渲染頁面。

具體這個片段將你在尋找什麼:

http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet330.java

相關問題