• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

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!
0
munting_monty
Asked:
munting_monty
2 Solutions
 
mmuruganandamCommented:
String url = "http://www.ibm.com";
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);

0
 
mmuruganandamCommented:
0
 
mmuruganandamCommented:
class Launcher
{
  public Launcher()
  {
  }

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


Regards,
Muruga
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Tommy BraasCommented:
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
 
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
 
objectsCommented:
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now