I'm using java.lang.Runtime to launch Internet Explorer from my application. The method call is as follows:
Runtime.getRuntime().exec(
"cmd /c \"C:\\Program Files\\Internet Explorer\\IEXPLORE\"" +
" http://www.myurl.com/mypage.asp?field1=value1&field2=value2");
The problem here is that dos is interpereting the ampersand as a special character instead of passing it literally into the argument to the IEXPLORE command... so what I get is internet explorer trying to open the site "http://www.myurl.com/mypage.asp?field1=value1". It then waits for the IE window to be closed, then it attempts to execute the command "field2=value2".
I just need to tell dos to escape the meaning of the ampersand! This sounds like a very basic question to me and I can't believe that I haven't been able to find the answer by searching the web.
Hopefully someone here will make me feel like an idiot and tell me how simple it is:)
thanks,
Jay