cancel
Showing results for 
Search instead for 
Did you mean: 

how to run .exe and set address to addressbar by using java

Former Member
0 Kudos

hai,

i have a problem that is

i should open an internet explorer automatically and execute a servlet.

how to set url pattern to automatically opend browser.

please send me the code

thanqqqqqqq

Guru

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Guru,

Here is the code to open an internet explorer and set url pattern.

(For example this opens google website)

String[] cmd = { "C:
Program Files
Internet Explorer
iexplore.exe", "www.google.co.in" };

Process p = Runtime.getRuntime().exec(cmd);

Regards,

Uma

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bojja,

try this piece of code, it should work fine

Link testApplicationLink = new Link("testApplicationLink");

testApplicationLink.setReference(TestUrl);

If u still have a problem, please give the exact details of your problem, so that i can try solving it.

regards

jagdesh

Former Member
0 Kudos

Hi Bojja,

I'm sorry, in the above example TestUrl is a String, which holds the url

i.e

String TestUrl = "http://www.google.co.in/";

testApplicationLink.setReference(TestUrl);

this should work, as it is working fine when i tested this code

regards

jagdesh

Former Member
0 Kudos

Hi,

Check out this link.

http://www.pcquest.com/content/coding/2004/104090202.asp

it gives the required thing.

regards,

P.Venkat