I've opened a web page through my browser.Is there any possibility to get the URL of that page through a Java application?Reply soon.Thanq
Printable View
I've opened a web page through my browser.Is there any possibility to get the URL of that page through a Java application?Reply soon.Thanq
Do you rreally mean url or html source code of that web page?
If you mean url then you have two options. You can capture screenshot of the desktop from Java. You can do that and if your web browser is opened, you can extract the url from thie image with image processing. Obviously a difficult way. :)
Another way can be to use windows APIs to obtain the url of opened web pages. I guess Windows should have such API calls. But to be able to use those calls, you will need to develop Java wrappers for those methods. You might search for APIs for that since someone might have already developed a wrapper.
Good luck.
Thnx for replying soon.But can u give me the source code of this method if available.Thanq
I don't know windows APIs much. That is why i said "I guess". You will need to search for it.