Results 1 to 2 of 2
- 02-19-2010, 06:19 PM #1Member
- Join Date
- Feb 2010
- Rep Power
opening default browser window in invisible mode
I am trying to open a default browser window, having a specific url, through a java application. I need to open the window in invisible(hidden) mode.
Moreover I need to save the source file as an html file.
can anyone give me any suggestions pls of how I can go around this problem?
- 02-20-2010, 02:50 AM #2
so, are you interested in having a URL fetched and saved as a file on the local system.
Such as you don't need to have the contents displayed?
In this case, usingthe commons-httpclient, or the Java URL HTTP Connection would likely be a more direct way to do this.
But also, I do not know of a way for Java to invoke a general web browser in a generic way to do this. Some browsers, such as firefox take command line paramters, its in theory possible to use the process builder to launch a browser instance and have it load a URL, but the making the browser minimized is not something that can be controlled with a command line parameter. I'm sure other browsers are the similar situation, where starting off minimized would be a feature of the window manager, such as KDE or Gnome, or Windows. And certainly if we were able to set up a command line sequence that does cause a browser to start up minimized and fetch content, we would not be able to instruct it to save the contents.
Actually, along the line of using java to invoke a system process. it is likely possible you could use the 'wget' command (assuming unix environment, or you happen to find a windows port that has this command, such a cygwin). that is a command line HTTP fetching content application. However the Java HTTP URL connection is likely a better option from within Java.
Hope that helps
- By Learnin in forum AWT / SwingReplies: 4Last Post: 10-07-2009, 09:14 AM
- By swati.jyoti in forum Advanced JavaReplies: 2Last Post: 09-08-2009, 02:08 PM
- By Pesch in forum Advanced JavaReplies: 5Last Post: 10-08-2008, 06:17 PM
- By waleed_cs2000 in forum NetworkingReplies: 1Last Post: 04-08-2008, 01:31 PM
- By Riftwalker in forum Java AppletsReplies: 4Last Post: 12-04-2007, 05:57 PM