?
Solved

Open IE Window with options from a Java application

Posted on 2004-04-23
11
Medium Priority
?
201 Views
Last Modified: 2010-05-18
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
Comment
Question by:munting_monty
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 9

Expert Comment

by:mmuruganandam
ID: 10899712
String url = "http://www.ibm.com";
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);

0
 
LVL 9

Expert Comment

by:mmuruganandam
ID: 10899717
0
 
LVL 9

Expert Comment

by:mmuruganandam
ID: 10899756
class Launcher
{
  public Launcher()
  {
  }

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


Regards,
Muruga
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 14

Accepted Solution

by:
Tommy Braas earned 500 total points
ID: 10899803
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
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 10900481
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
 
LVL 7

Expert Comment

by:maheshexp
ID: 10901145
String url = "http://www.sun.com";
Runtime.getRuntime().exec("iexplore " + url);
0
 
LVL 92

Assisted Solution

by:objects
objects earned 500 total points
ID: 10905321
u could use exec and also use javascript in the html to set any options required.
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 10915917
Finally someone else who actually read the question! Thanks Mick. ;-)
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 11154297
Sounds good to me
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month13 days, 6 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question