This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes problem of opening html file through IE using swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problem of opening html file through IE using swing" Watch "problem of opening html file through IE using swing" New topic

problem of opening html file through IE using swing

Kapil Keskar
Ranch Hand

Joined: Dec 04, 2001
Posts: 47
i wanted to open a document using Internet Explorer/Netscape.
what i am planing is that to generate reports for printing, through crystal report application or using IE as there is inbuilt facility for printing & report generation.
As per above code i could open Internet application through swing, but i cannot open specific file which i wanted to print in that application.
1)step open internet explorer/ crystal report generator
2)step open a document of html file for internet explorer or open a document of crystal report in crystal report.
3)step after opening file in html format/cry. rep. we can print the file as we want.
import java.util.* ;
import* ;
public class IE
public static void main ( String[] s )
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("C:/Program Files/Internet Explorer/iexplore.exe");
System.out.println("IE OPENED");

catch(Exception ex)
System.out.println("Error occured"+ex);

can anybody please help me out of this situation?
Thanking you
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
I think you can probably just send the file as an argument to IE something like this...

hope this helps,
regards, Ben.

SCJP 1.4,
Have you checked out Aspose?
subject: problem of opening html file through IE using swing
It's not a secret anymore!