• Post Reply Bookmark Topic Watch Topic
  • New Topic

Opening External Application

 
Jain Neeraj
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can somebody please tell how can i open a file which is in WinHelp format (xyz.hlp) by my Swing program?
Thanks,
-N.
 
Manikandan Adaikkalavan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this
import java.io.*;
public class test
{
public static void main(String ar [])
{
try
{
String url ="file:///c:/somefile.zip";
Runtime.getRuntime().exec("cmd /c rundll32 url.dll,FileProtocolHandler " + url);
}
catch(Exception e){}
}
}
 
Jain Neeraj
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for suggesting the approach, i used the program described in a Java world article and it worked perfectly.
(http://www.javaworld.com/javatips/jw-javatip66_p.html)
Thanks again,
N.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!