Log in

View Full Version : Invoke Pocket IE from Java


dlhirsch
12-06-2005, 06:37 PM
I have a Java app that has the requirement to pass a URL to Pocket IE and start IE. I have tried both CrEme and Jeode. Does anyone have any example code on how to do this? I have tried the following to no avail:
String myWebPage = "http://www.google.com" ;
Runtime.getRuntime().exec("\\Windows\\Start Menu\\Internet Explorer ") ;

Any ideas/suggestions would be greatly appreciated.
Thanks in advance

JonMisurda
12-12-2005, 05:42 AM
Assuming they support Runtime.exec() at all (the old reference JVM from Sun didn't), you'd need to launch iexplore.exe

String myWebPage = "http://www.google.com" ;
Runtime.getRuntime().exec("\\Windows\\iexplore.exe") ;

Jon

dlhirsch
12-13-2005, 11:21 PM
Thanks Jon. It worked like a champ. If I wanted to start Pocket Outlook would I just use "poutlook.exe" instead of "iexplore.exe: ?? Thanks again.

JonMisurda
12-19-2005, 07:49 PM
Yes, but poutlook.exe is a general service, so you need to invoke it with a parameter that says which mode to start up in:

\windows\poutlook.exe calendar
\windows\poutlook.exe contacts

Jon