The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
August 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Invoking exe files in java

Posted by Sridhar on December 21, 2000 at 10:11 AM

Hi Harish

here is how to run exe files from java programs.

import java.io.IOException;
public class WorkingWithExeFiles
{
public static void main(String argv[])
{
Runtime rt = Runtime.getRuntime();
try
{
rt.exec("C:\\Program Files\\Microsoft Office\\Office\\winword");
} catch(IOException ioe) { ioe.printStackTrace();}
}
}

Try this link for further help. http://www.esus.com/javaindex/j2se/execotherjava.html
GoodLuck
Sridhar

> hello,
> i am working on a project in Java where an Word.exe file
> should be invoked from an java application program.
> Pls support me.

>






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us