I am attempting to launch an Internet Explorer window using Java code like so:
Runtime.getRuntime().exec(folder + ":\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://google.com/");
This method works perfectly, however, I need to open the window in a small size. To achieve this, I tried implementing the solution found in How do you resize an IE browser window to 1024 x 768. Unfortunately, I'm unsure how to integrate the JavaScript solution into my Java code.
I attempted to pass it through the command line like this:
Runtime.getRuntime().exec(folder + ":\\Program Files\\Internet Explorer\\IEXPLORE.EXE javascript:resizeTo(1024,768); http://google.com/");
However, this approach did not work as expected. If anyone has any suggestions or ideas on how to make this work, please let me know.
Thank you in advance.