File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I open a Windows program from a Java program?

 
Matthew Alesi
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a simple task I'm trying to do in a program I made: it produces an HTML file which I subsequently want Internet Explorer to open up and print out. I have everything working up to the point where I need to open IE...and then I realized I don't know how. How can I do this?'

Thanks!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Opening IE for a specific page or file is easy enough. Just use Runtime.exec() to run "iexplore file://whatever.html". Getting IE to print thereafter though, that is hard. Is there any reason why you want IE to print the file? You could just use the Java Print Service API to do it without the involvement of IE.
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to do OS specific things, you can use RunTime.exec(..);

To execute find the code snippet,

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic