• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

launching IExplorer with java

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello thanks for reading this
I am writing a simple html editor and wish to be able to view my pages in a browser
I can launch IExplorer as follows but am unclear as how I can make it launch with my working html document
any ideas?

public void view() {
Runtime r=Runtime.getRuntime();
Process p=null;
try {p=r.exec("Iexplore");}catch(Exception e){System.out.print(e);}
}
 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After iexplore.exe, just add your html file as a parameter. So to open the page java.sun.com, you would use:
iexplore.exe http://java.sun.com
Using Runtime.exec(), you can put each command line item in an array.
Run[0] = "iexplore.exe";
Run[1] = "http://java.sun.com";

Then call Runtime with the array as a parameter:
Runtime.exec(Run);
HTH
Brian
 
What do you have in that there bucket? It wouldn't be a tiny ad by any chance ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic