public class MediaPlayerThread extends Thread { Process mediaplayer_process; OutputStreamWriter out_to_mediaplayer; String Clipname; Clip Clipinfo = new Clip(); /** Creates a new instance of MediaPlayerThread */ public MediaPlayerThread() { } public void run() { System.out.println("we are in run!"); String Clipname, Uploadername, Play_Command, Clipid; Clipname = Clipinfo.getClipName(); Play_Command="c:\\mplayer\\mplayer.exe -fs -slave -quiet " + Clipname; System.out.println("Playcommand: " + Play_Command); try { mediaplayer_process = Runtime.getRuntime().exec( Play_Command ); System.out.println("executed"); BufferedReader in = new BufferedReader(new InputStreamReader( mediaplayer_process.getInputStream() )); out_to_mediaplayer = new OutputStreamWriter(mediaplayer_process.getOutputStream()); mediaplayer_process.waitFor(); } catch(Exception e) { System.out.println(e.getMessage()); } } . . . .