Open IE Window with options from a Java application

Hello all,

I am looking for way to open an IE window with options (such as toolbar=1; width=n; etc.) from a Java application. I am aware of Runtime.getRuntime().exec(proccess, url), however IE has a limited choice of command-line parameters.

Thanks!
munting_montyAsked:
Who is Participating?
 
Tommy BraasConnect With a Mentor Commented:
Unless the browser supports specifyinf options via the AppletContext.showDocument(URL url, String target), there is no way. AFAIK IE does not support this, nor does any other browser on the market or the Java Plugin.

Furthermore, in order to be able to execute Runtime.exec() from inside an applet, the applet jar has to be signed or the security policy (a wholesale change) needs to be modified in order to allow this.
0
 
mmuruganandamCommented:
String url = "http://www.ibm.com";
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);

0
 
mmuruganandamCommented:
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
mmuruganandamCommented:
class Launcher
{
  public Launcher()
  {
  }

 public void launch(String url)
 {
    Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
 }
}


Regards,
Muruga
0
 
rama_krishna580Commented:
try this...

Runtime.getRuntime().exec(new String[] {"/usr/mozilla/mozilla-bin", "file:///help.html"});    

OR

Runtime.getRuntime().exec(new String[] {"/usr/mozilla/mozilla-bin", "-remote", "openurl(file:///help.html)"});

or try this..

http://www.artima.com/legacy/answers/Oct2001/messages/146.html

best of luck..

R.K
0
 
maheshexpCommented:
String url = "http://www.sun.com";
Runtime.getRuntime().exec("iexplore " + url);
0
 
objectsConnect With a Mentor Commented:
u could use exec and also use javascript in the html to set any options required.
0
 
Tommy BraasCommented:
Finally someone else who actually read the question! Thanks Mick. ;-)
0
 
Tommy BraasCommented:
Sounds good to me
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.