Help Playing a MP3 files in a java application!

Hey, i need help playing MP3 files in a JFrame application. Any help is apperciated.

Google for JLayer.

Similar Messages

  • Help Playing MP3 files in a java application!

    I can't get Mp3s to play in a JFrame. Any help is apperciated thx.
    Message was edited by:
    h@LL

    Google for JLayer.

  • Continuously play an audio file in a java app?(loop)

    NOTE: I AM NOT TALKING ABOUT PLAYING A FILE IN AN APPLET!
    What I need is a way to play the file continuously (or get the file to loop) in a java APPLICATION
    I have found a way to play a file in a java Application : (but i cannot get it to loop)
    Here is what I have so far:
    import sun.audio.*;
    import java.io.*;
    FileInputStream in = new FileInputStream(Filename);
    AudioStream as = new AudioStream(in);
    // Use the static class member "player" from class AudioPlayer to play
    // clip.
    AudioPlayer.player.start(as);
    but How do I make it loop??
    Is there anyway I could possibly use the URL class instead to open the file and the use the AudioClilp class to play that file
    This is something I found on another website that uses this idea, but I dont know how to use it.
    According to the author:
    newAudioClip(URL) is a static method in Applet Class, so it can easily be used in Applications as well.
    e.g.
    AudioClip ac = Applet.newAudioClip(url);
    ac.play(); //play once
    ac.stop(); //stop playing
    ac.loop(); //play continuously
    Here url can refer to some file within the jar file. So, this method is very useful.

    someone16 wrote:
    NOTE: I AM NOT TALKING ABOUT PLAYING A FILE IN AN APPLET!Please don't shout. It's considered rude.
    >
    >
    What I need is a way to play the file continuously (or get the file to loop) in a java APPLICATION
    I have found a way to play a file in a java Application : (but i cannot get it to loop)
    Here is what I have so far:
    import sun.audio.*;
    import java.io.*;
    FileInputStream in = new FileInputStream(Filename);
    AudioStream as = new AudioStream(in);
    // Use the static class member "player" from class AudioPlayer to play
    // clip.
    AudioPlayer.player.start(as);
    but How do I make it loop??Err ... maybe place the code in a loop.
    Is there anyway I could possibly use the URL class instead to open the file and the use the AudioClilp class to play that file
    This is something I found on another website that uses this idea, but I dont know how to use it.
    According to the author:
    newAudioClip(URL) is a static method in Applet Class, so it can easily be used in Applications as well.
    e.g.
    AudioClip ac = Applet.newAudioClip(url);
    ac.play(); //play once
    ac.stop(); //stop playing
    ac.loop(); //play continuously
    Here url can refer to some file within the jar file. So, this method is very useful.So you can use a URL.

  • How to create a .exe file for a java application

    Hi, I want to create a .exe file for a java application I am developing so that I can schedule it to run at a particular time using Windows Scheduler on WinNT. Is there any way to accomplish this? Or is there any other way in which a Java application can be scheduled to run at a particular time on Windows everyday?

    Create a .bat file and run that. Just have, in the .bat file:
    java YourClassName Alternatively, you can use javaw YourClassName (without *.bat, just put it into Windows Scheduler like suggested above).
    using javaw won't pop up any window...

  • Can we run the batch file using simple java application

    Hello sir,
    we want to run the batch file using simple java application. i tried with some example, we run the exe files but not batch file.
    Runtime r = Runtime.getRuntime();
    r.exec("D:\\jboss\\bin\\run.bat");
    My application is server will run when we run the java appliation.
    any suggestion? plz give me the solutions

    yes you can run html file
    WEB.SHOW_DOCUMENT is a built-in that is used in Forms to call URL from a Web Form. It works much like the similar way that a link on an HTML page works and it takes two arguments, one is URL and second one is TARGET, in your case use following.
    WEB.SHOW_DOCUMENT('http://channas.iil.informatics.lk:8890/forms/frmservlet?config=abc.html', '_blank');
    Hope this will work for you
    Abbas

  • JMF can not play some MP3 files on the web

    I try to write the application using JMF with MP3 plug-in. The application will search the word in Google dictionary
    and play the MP3 sounf online.
    The almost word is playing good with the MP3PLAYER, but some is always no sound.
    And Itry to add ControllerListener for this, and every word got the realizeComplete and endOfMedia event.
    but I just can not here the sound for some word.
    for example -
    http://www.google.com.tw/dictionary/sounds/actress.mp3 does not work
    http://www.google.com.tw/dictionary/sounds/actual.mp3 work
    This is one first java application. And I got stuck for couple days. Is anyone can give me some hint ?
    Thanks !!!!!!!!!!!!!!!!!!!!

    CAL297297 wrote:
    But my requirement is to play the MP3 immediately when the user search the word.
    Covert from MP3 to and WAV take too much time. I never said to do that as a solution, I told you to do that "to test that" the problem is that you're trying to play unsupported MP3s. Please do listen when people are trying to help you out.
    Is there any other soulution except JMF ?To play mp3 files? Ummmm, yeah...go Google to your heart's content on ways to play MP3s (but you'll have to find another forum for help with that, because this forum is only for JMF)

  • Prob with iTunes playing downloaded .mp3 file

    Hi,
    when I download a single 64Kbps MP3 file (song) from archive.org/audio, it will save to the desktop and look something like this: dtb2005-03-04d1t03_64kb.mp3 Then I try "add to library" in iTunes (5) and the song name appears, but it will be only a couple of KB and play for a split-second - that's all ... Any help, anyone ??
    Thanks very much!
    peace.
    p.s. song will play on Safari page after download, but not after saving.

    thanks Mike for the response ... I don't know what you mean by "find the cached file in Safari". I did search for anything of that filename (and Spotlight just found those tiny files) - And I have now updated to iTunes 6.0.1. ... and the exact same thing happens. I just get a 1.2KB tiny file in iTunes that goes "blip" and it's over.
    I've noticed that the complete song in the Safari window has progress bar with volume and play at left, then the progress bar, then at the right there is a "down arrow" pull-down menu that has Quicktime options: "About Quicktime Plug-in", "Save as Source..." , "Save as Quicktime Movie...", "Plug-in Settings..." and "Connection Speed..." .
    I tried the "Save as Source" - nothing happened. Same with "Save as QT movie".
    The "Plug-in Settings..." takes me to some options, many of which are over my head ---- however, there is an option to Register or Buy QT Pro ... could this be what's necessary?
    Under "Connection Speed" are also many options (don't understand most of them) but I did change to the slowest speed (since I have dial-up) ... and maybe I'll try to re-download something and see if there's a difference.
    I appreciate your help - odd thing is, it used to work with single songs and it has recently worked with whole shows (came in Zip file or .flac) and those worked fine ....... but I only had a couple days' opportunity to use a high-speed connection.
    Thanks again !
    peace,
    Rob

  • How do I play embedded mp3 files?

    Hello,
    Is Adobe Reader for iPad capable of opening my embedded mp3 files? If not, then how can I  get the audio to play inside the document?  The original document was created in Publisher 2012...converted to pdf where I embedded the mp3.
    Thank you for your help.

    Adobe Reader for iPad has no support for MP3 or video files. You would need to use a paid PDF reader like PDF Expert.

  • How can I play embedded MP3 files in Firefox 19?

    I am on a site where I can buy MP3 files. There is a preview of each song. When I click the preview, nothing happens.
    If I open IE and do the same thing, I hear the song.
    When I return to Firefox, I can then play that same song in Firefox. I can only do this if I open the link in IE first.
    I have the Quicktime plugin installed and enabled. In Firefox options, it shows to open MP3 links using the Quicktime plugin

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can delete the mimeTypes.rdf file in the Firefox Profile Folder to reset all file actions.
    *http://kb.mozillazine.org/mimeTypes.rdf
    *http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder

  • Unable to load/play some mp3 files on library

    This is simply my problem:
    When i drag and drop some mp3 files to load them on the library iTunes does simply nothing! No track uploaded, no error messages, nothing...The same thing when i try to play them with itunes. Double click on the file and...nothing! These files are similar to the others, 320 kbps bitrate.I tried to change their names o the advanced options but it didn't work. Please help me.

    Verify that the files will play in another player, such as Windows Media Player. If so, you have encountered the classic symptoms of iTunes being strict/finicky/incompetent (pick your own interpretation) about slight variations in the MP3 headers.
    Use a cleanup program to get them in shape. Many people here have had success with MP3 Validator.

  • MediaSource 3 don't play mono MP3 files

    Hi, From years I used Media Source 3.30.2 without problems, but an extraneous thing happen. When I click over a monophonic MP3 file, the MS3 open it but don't play it, it didn't do nothing. I uninstaled and instaled it again, but the problem continue. I installed the MS 5.26.02 and it works fine, and it plays the mono MP3 files. But I don't like MS5 because it haven't an EAX button, like the MS3. In my computer others players that I have instaled haven't this problem, only the MS3 ?!? I have Windows XP Prof. and Audigy 2SZ. Please can you help me, Why it can be?, What I can do to correct this problem? Thanks, Victor

    First_knight wrote:
    catch (Exception ex) {System.out.println("Can't Play");}          If something doesnt work then hiding the exception is the worsed you can do.
    Add a printstackttrace, it might help you

  • ITunes 10.6.3 not importing mp3 files but will play the mp3 files

    Hi
    I recently updated my iTunes to v10.6.3 on my mac. However, I cant seem to add new music to my iTunes library. Dropping and dragging doesnt work even though the '+' curser appears and importing music using command + O doesnt work either. There is no indication of the music being analysed or anything.
    However, when I click on an mp3 file it opens and plays in iTunes but will not be added to the library. If I click on the mp3 file again from finder, it will play in iTunes from the last point..
    Does anyone have any ideas of wrong? Its frustrating me because I need to sync music to my iPhone and I cant
    Thanks

    Ye playing the file should automatically add it to iTunes but its not since I updated iTunes.
    The music plays and I can see the the time bar in the window on the top of iTunes but the file is not located in the iTunes library or anywhere in iTunes so I cant right click it.
    At the moment the mp3 file is on my desktop. Normally dropping and dragging it into iTunes adds it into my 'iTunes' folder in the 'Music' folder.. but this is not happening. I've tried manually adding the file into the 'iTunes' folder using the appropriate folder titles etc.. but iTunes will not detect the new mp3's. Wierd!!
    I think I might just have to re-install iTunes

  • 'Play Only' .mp3 files

    Hi All - is there a way to embed MP3 files output via QuickTime in my homepage to that browsers can play them but not download them? I note there are a number of lightweight 'players' out there, like the ones on MySpace, that do this, I would rather do it with QuickTime if I could.
    thanks

    The easiest method would be to put the MP3 inside a QuickTime .mov container.
    Open the file in QuickTime Pro and "Save As". Simple and fast with no re-compression. Only QuickTime Pro owners could download the file.

  • Having problem with playing audiobook .mp3 files

    I have downloaded some audiobook mp3 files. I can transfer them fine to the Ipod, but when I choose the file to play, it goes through all the steps right up to the playing of the mp3 file, then the backlight shuts off, the screen wipes out and the white apple logo comes on and reboots into the main menu screen list.
    As long as I continue to choose these audiobook mp3 files the Ipod will continue to reboot and not play the file.
    I have downloaded the same audiobooks on 2 different occasions, and the same thing happens. The files do play through the iTunes library list from my computer.
    Any ideas on how to solve this?? I don't have any problems playing any of the other audio book mp3 files that I have dragged and dropped onto the Ipod.

    http://docs.info.apple.com/article.html?artnum=304490

  • ZEN: I can't play/see mp3 files that I CAN play in Win

    A few albums I have uploaded to my ZEN aren't visible in the player itself.
    Example: I upload 5 albums of band X. When I browse they are visible but when I start my ZEN and want to play only 3 albums are visible. As for as I know they are normal mp3 files because I can play them with Winamp. What's the problem?

    The album photos are just the originals; there are no special copies in the album--it's just a list. Select the photos in the album, then go to File>Export as New Files and send the new copies where you want them.

Maybe you are looking for

  • Mini DVI to S-Video B&W only!!

    I bought a Mini DVI to S-Video adapter and a S-video to RCA cable to hook my MacBook up to my TV, but when I plug it in I can only see it in Black and White. I checked System Prefs>Displays and tried out several different profiles, to no avail. FWIW

  • Dialog boxes text limit?

    Is there a limit to the amount of text that can be displayed in a dialog box.

  • Best practices for initial data loads to MDM

    Hi,    We need to load more than 300000 vendors from SAP into MDM production repository. Import server might take days to load that much if no error occurs. Are there any best practices for initial loads to MDM available? What considerations must be

  • 7410 HA: CIFS authentication from Windows AD users breaks frequently

    Often, now the last two days authentication stops working from our Windows AD clients to the CIFS shares. They are presented to a username/password box but no credental will be accepted. Restarting the CIFS service immediately makes things work for d

  • SET MAXCORRUPT

    Hi, I'd like the RMAN backup command to fail if it detects any corruption (physical or logical) in the datafiles it is backing up. I have been using the following command to perform the checks as part of the backup: RMAN> backup as compressed backups