DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005

    anyone know's a class for executing external apps?


    I'm looking for a class that implements a method for executing an external application in windows.

    For example : if i wish to listen to an audio file, and i have a button in my applet, what can i do, so that when that button is pressed, plays that audio file?

    Is there a method in any class that implements that functionality?

    Thanks in advance, KC

  2. #2
    Join Date
    Oct 2004
        Runtime run = Runtime.getRuntime();
        Process proc = run.exec(cmd);
        int Result = proc.waitFor();
    Only thing you have to remember is that some applications always return 1 as result, no matter if it actually was successfull.

    I use this to startup an external program for audio conversion, so I check the actual success by looking if the output file of the conversion actually exists.

Similar Threads

  1. Help with class/applet
    By none_none in forum Java
    Replies: 17
    Last Post: 04-28-2005, 03:00 PM
  2. Calling external apps in VB.NEt
    By shickey in forum .NET
    Replies: 2
    Last Post: 02-25-2005, 12:29 PM
  3. Replies: 5
    Last Post: 10-17-2002, 01:58 PM
  4. Assembly class
    By Shailesh C.Rathod in forum .NET
    Replies: 2
    Last Post: 03-13-2002, 07:53 PM
  5. How To Do It - Shared Class Variables Part III
    By Patrick Ireland in forum .NET
    Replies: 5
    Last Post: 05-10-2001, 06:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.