• 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

problem of opening html file through IE using swing

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
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.
Concept---
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 java.io.* ;
public class IE
{
public static void main ( String[] s )
{
try
{
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
 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I think you can probably just send the file as an argument to IE something like this...

hope this helps,
regards, Ben.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic