-1

It's a java desktop, need to capture url of current active browser window. Can I do this with java?

complez
  • 7,882
  • 11
  • 48
  • 56

1 Answers1

2

It is possible to get URL's of all Internet Explorer instances . But through C# approach , i could'nt find a solution using JAVA.

The alternative is to write C# executable which prints the URL , invoke it through java process and get the output.

                    String cmd =  "/GetURL.exe ";             
                    Process p = Runtime.getRuntime().exec(cmd);

You can use the stream readers to determine the output of the command executed .

Explained the C# approach to get the URL of IE objects using SHDOCVW.dll ,

How to get the URL of the Internet explorer tabs with PID of each tab?

just use C# Express edition 2008 and try the code , it will result in Interop.SHDocVw.dll and an Exe .

Since firefox is a third party application , i dont know if there is any way . Internet Explorer comes handy with the OS so it was possible .

Community
  • 1
  • 1
Shaik Md
  • 597
  • 4
  • 8
  • 22