Opening  mp3 file while using program

Hey everyone, im new to java programming
I am trying to open an mp3 file in windows media player when my program starts
it would be nice to also end windows media player when the user exits the program
I have tried this, but i dont see wmp open but i see the pc thinking and a wmp process in task manager, some help please!
try{
ProcessBuilder p=new ProcessBuilder("wmplayer","H:\2007 Billboard Pop 100\014 - Gym Class Heroes ft. Patrick Stump - Cupid's Chokehold");
p.start();
}catch(Exception e) {}

im trying
          Desktop.getDesktop().open(new File("H:\\MCB2 - Java\\My Projects\\Lachhman, Gregory Project List #3\\Number 2\\It Ends Tonight.MP3"));
but i get
1 error
H:\MCB2 - Java\My Projects\Lachhman, Gregory Project List #3\Number 2\StudentInfoTest.java:20: unreported exception java.io.IOException; must be caught or declared to be thrown
          Desktop.getDesktop().open(new File("H:\\MCB2 - Java\\My Projects\\Lachhman, Gregory Project List #3\\Number 2\\It Ends Tonight.MP3"));
          ^
1 error
Tool completed with exit code 1

Similar Messages

  • How to open log file while program is running?

    Hi,
    I am using log4j to generate a log file. The application connects to a remote server and does some updates on a database. Is it possible to view the log file while the program is running? When I click on the log file to open it, I get a message "the document is in use by another application and cannot be accessed".
    Looking for ideas to get around this problem.
    Thanks and Regards,
    Harsha Hegde

    tail.exe -f
    Tail is a Unix program but if you search google you can find a port for Windows. It will show the contents of the file in a cmd prompt and will update as new lines are being added to the file so you can see the most up-to-date version as log4j is writing to it.

  • How do i change default program for opening mp3 files

    Hi all, i would like to change the default program for opening MP3 files, it is currently iTunes, i would like it to be MPlayerX or QuickTimePlayer, ii am sure it is easy once i know where to look, it is easy in Windose, is has just got to be easier with my Apple
    Tim

    Tim,
    Right click on one of your MP3 files and select "get info".  In the get info screen you can select the default program to open the file.  Then select Change All..  to make it the default for all MP3s.
    Regards,
    Captfred

  • Hi when i switch on the macc 41 files open at once can not open any files while this is happing can still use AI & PS and the internet any help thanks...

    Hi when i switch on the macc 41 files open at once can not open any files while this is happing can still use AI & PS and the internet any help thanks...

    Are you wanting to stop the 41 files from opening at once or is this intentional? At what point do they open when you power on the mac or when you boot Illustrator? What OS version are you using?
    If you can  answer the questions above can provide better advice, but you may be running into something similar:
    http://www.mactip.net/stop-lion-restoring-previous-files-apps/

  • How to open a file with approriate program

    When I program a project I have a problem of opening a file. For example, If I open a word file I want to call Microsoft Word to open this file or if I open *.mp3 file I want to call Winnamp to open this file etc... I know that VC++ can do that by using ShellExecute() procedure but in Java I don't know how to do that. Can you show me how to do, please.
    Thanks.
    Duong Ngoc Hieu

    You may mostly have to do a JNI Call or Spawn a Process and do it. There is one another way of doing it. Use JNDI to search the Registry to find the Associated Program File, parse the commandline arguements and use it to spawn a Process. But I think you need some thirdparty components for Registry Access using JNDI. Try searching for JNDI Registry Access Components.

  • Cannot open pdf files while the Reader instance is running

    Today I suddenly noticed that if I try to open pdf file while the Reader instance is already running (even if it has no pdf files open), the cursor just blinks one or two times without any further activities. So the only way to open files now is by closing the previous instance and starting the new one. I think this problem started to appear after upgrading to 11.0.3. I am using Windows 7 32 bit.

    I narrowed the problem: it happens if the file is in a directory which is a join point on the NTFS file system (i.e. a link to another directory), where the link source is in turn a join point itself (i.e. we have a two-level NTFS directory link). As this is rare, it could be not a problem of the particular version of the Reader, it just probably happened by coincidence that after upgrading the first directory I accessed was of this kind.

  • Record Audio in mp3 file format using FMS

    I am Recording Audio Using FMS which will record Audio file in FLV File Format default But I like to Record in MP3 File Format. Is it Possible.
    And I also Record Video In MP4 File Format using h264 encode. Which Give me Video File in MP4 File Format but When i will try to play that MP4 File it Didn't play. So, I post-processed video with a tool called F4V Post Processor. Now That MP4 Video File Play But Didn't Give me Sound in that Video.
    My Code is:
            var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
            h264Settings.setProfileLevel(H264Profile.MAIN, H264Level.LEVEL_3);
            ns.videoStreamSettings = h264Settings;
            ns.publish("mp4:"+FILENAME+".mp4","record");
    I search Lot but didn't get the solution. So, Please Give me Solution for Both thing.

    The .flv format is a "container" format, not a video format.
    So that means that inside the container, you can have a video file and/or an audio file or even just an audio file.. which most likely is already an mp3 file. Use something like "FLV Extract" to break open the container and see:
    http://moitah.net/
    But really, for any Web delivery of audio, the .flv (audio only) method works just fine. Lots of media players available for the Flash .flv file.
    For example:
    Sounds from my bunk on the Lady Washington
    http://exploreolympics.com/reports/?p=2857
    Scroll down to third media player.
    A little quiet to start with... but this is a .flv file with just an mp3 audio file inside.
    Best of luck!
    Adninjastrator

  • How do I convert an MP3 file to use it as a ringtone on my iPhone 3G?

    How do I convert an MP3 file to use it as a ringtone on my iPhone 3G?

    Andrew J wrote:
    Everybody's wrong wrong wrong. You don't need garageband. Select the song, go to info. You need to select a start and stop time for the song that can't be any longer than 40 seconds in length. Then in advanced mode you convert the song to acc. once done locate the file on the computer. it should end in .m4a . Change the a to an r so it reads .m4r Drag the file to the desktop, double click and it ends up in ringtones folder.
    That's it! Works every time. Or for those who want easier:
    http://www.ambrosiasw.com/utilities/iToner/
    My drug of choice.

  • Adobe reader XI can't open mp3 files in a pdf document- says the required decoder not installed

    Adobe reader XI can't open mp3 file links contained in a pdf - it says the required decoder is not installed
    please help!

    This is not a function of Reader, but that your computer does not seem to be configured to play mp3 files. Try fixing your file associations. The method of doing so depends upon your OS and it version number.

  • Type of error in the log file while using using call transaction mode u2018Eu2019

    Hi Gurus,
    Please Answer for this qusetion urgently
    what type of error exactly  you will be seeing in the log file while using call transaction mode u2018Eu2019?
    Thanks/
    Radha.

    Hi,
    Can you be clear.
    In call transaction , no error logs  are created, you have to handle the errors explicitly using the structure BDCMSGCOLL.
    Whenever you use E mode then if the transaction encounters any of the errors i.e. data type mismatching or invalid values etc, it will stop at that screen.
    You can handle the errors in call transaction in the following method.
    create a table using the structure BDCMSGCOLL.
    then
    loop at ......
          CALL TRANSACTION 'XK01' USING I_BDCDATA MODE 'N' UPDATE 'S' MESSAGES INTO I_MESGTAB.
    endloop.
      SORT I_MESGTAB BY MSGID MSGV1 ASCENDING.
      DELETE ADJACENT DUPLICATES FROM I_MESGTAB.
      LOOP AT I_MESGTAB.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            ID   = I_MESGTAB-MSGID
            LANG = I_MESGTAB-MSGSPRA
            NO   = I_MESGTAB-MSGNR
            V1   = I_MESGTAB-MSGV1
            V2   = I_MESGTAB-MSGV2
            V3   = I_MESGTAB-MSGV3
            V4   = I_MESGTAB-MSGV4
          IMPORTING
            MSG  = MESG1.
        IF I_MESGTAB-MSGTYP = 'S' .
          WA_SUCCMESG-MESG = MESG1.
          APPEND WA_SUCCMESG TO I_SUCCMESG.
    else     IF I_MESGTAB-MSGTYP = 'E' .
          WA_ERRMESG-MESG = MESG1.
          APPEND WA_ERRMESG TO I_ERRMESG.
        ENDIF.
      ENDLOOP.
    Hope this is clear.
    Thanks and Regards.

  • Cannot open mp3 file

    Hi,
    I got a mp3 file which i recorded recently. When i try to open it in soundtrack pro i get an error "Can't open file "xxxxx". When i open it with Quicktime Player it starts playing. I guess that during the recording there was an error at the end so the file is not correctly closed and the end of the file is corrupt.
    Is there a way to fix that?
    Thanks
    Daniel

    I also experienced this problem, not being able to open mp3 files in soundtrackpro and eventually discovered that the problem lay with the source of the file.
    If I tried to open an mp3 file on an external hard drive I got the error message, when I transferred the same file to the default Soundtrack pro folder on my macpro’s internal hard drive, it opened without any problem at all.
    I wonder if the problem is related to the relatively slower access speed when accessing the plug in external hard drive ?
    Hope this helps.

  • Open note for S_ALR_87008272 using program RKAZUTR1

    Hi Experts,
    Please provide open note for S_ALR_87008272 using program RKAZUTR1, to run S_ALR_87008272 in Quality and Production client.
    Thanks
    Neeraja

    Hi,
    The t.code S_ALR_87008272 is used to maintain overhead percentages.
    Once the percentages maintained in Development system, those percentages will come automatically via request number.
    For that purpose you have to run this  program RKAZUTR1  via se38 t.code with request number.
    Regards
    Ravi Polampalli

  • Failed tp open .prp file while running HAL ...it says Sharing voilation ..

    Failed tp open .prp file while running HAL ...it says Sharing voilation ..
    I am running a HAL job.
    While opening .prp file it says error Sharing voilation cannot open file.
    Please help to resolve issue.

    Are you sure there are not multiple instances of the prp open, say 2 remote connections both with the file open.
    If there is a lock on the file and you are able to reboot the machine I would give that a go.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • MP3 files being used by MAC OS X and cannot be opened?

    I'm setting up my play lists in ITunes 7.0.2 on my Macbook and I started realizing a few songs where missing. The MP3 files are in my music folder but do not show up in ITunes. When I click on the in the music directory it gives me the following message in a pop up.
    Item "name of song.MP3" is being used by MAC OS X and cannot be open.
    Any clue what is going on? It's happened on several different songs so far. Thanks

    I recopied the bad files from my network backup drive and all seems well but I still don't understand why The system told me it was using the files.

  • Open .lvm file while program is running

    How do I open a .lvm file within my program? I've tried using the Open/Create/Replace File dialog with File Dialog specifying the path and I can get to the point to select the path, and it doesn't open the file.
    Solved!
    Go to Solution.

    Can you please post your code so we can see what you are doing.
    Cory K

Maybe you are looking for

  • InfoObject not appearing in Formula Builder

    <b><i>I have an active set of ODS update rules, and am trying to use formula builder to "RIGHT 8" the values of one of the source fields. For example, my field is packed with 00000000CUSTNAME, and I want to trim right 8 to CUSTNAME. However, when I l

  • -cvs, -git, -snv... is really a good naming convention?

    The unstable packages have the name of their relative stable one with added in suffix the concurrent version system installed. I think it is a bad convention since it mixes implementer choices with the the concept of lastest unstable version. I think

  • InDesign CS3 will not open for second user

    I am running InDesing CS3 on a iMac 10.4.11.  InDesign, Photoshop and Illustrator all open for my admistrative user account.  I recently created a second user account  that is unable to open InDesign even though Photoshop and Illustrator open just fi

  • RDBMSRealm Oracle lessons learned

    I have been trying to research an ORACLE RDBMSRealm implementation on WL6.1 for the last few days and realized based on newsgroup postings that this type of implementation is done by trial and error. I have not completed a full implementation yet, bu

  • My Firefox 8 Menu button doesn't work and neither does the right click in the firefox window

    It seems that all the drop down buttons in the browser, including the bookmarks dropdown menu in the toolbar and the main menu button (firefox button), no longer work. This happened after i upgraded to firefox 8. I've tried uninstalling and reinstall