Tuesday, 2 February 2016

Play a media - media on other player

Program

import java.awt.*;
import java.io.*;

public class Mymedia
{
  public static void main(String[] args)
  {

   try{
    Desktop d = Desktop.getDesktop();

    d.open(new File("E://god//hanuman.mp3"));

    }
    catch(Exception e){}

   }

}


Output

(The file will be played in your default media player)

No comments:

Post a Comment