Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7858477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:27:30+00:00 2026-06-02T21:27:30+00:00

I am trying to run a sound file in Java using this code: public

  • 0

I am trying to run a sound file in Java using this code:

  public class Audio3
  {
     public static void main(String[] args) throws Exception
      { 
        URL soundFile =new URL( 
          "http://everyayah.com/data/Ghamadi_40kbps/audhubillah.mp3");
        AudioInputStream ais = AudioSystem.getAudioInputStream(soundFile);
        AudioPlayer.player.start(ais);
      }
  }

I am getting this exception

javax.sound.sampled.UnsupportedAudioFileException: 
    could not get audio input stream from input URL

Any idea what could be the reason?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T21:27:31+00:00Added an answer on June 2, 2026 at 9:27 pm

    According to the JavaSound info. page.

    MP3 decoding support

    The Java Sound API does not support many formats of sampled sound internally. In a 1.6.0_24 Oracle JRE getAudioFileTypes() will generally return {WAVE, AU, AIFF}. An MP3 decoder at least, is close by. The mp3plugin.jar of the Java Media Framework supports decoding MP3s.

    I can vouch for that information since I’ve successfully loaded MP3s using Java Sound and the MP3 SPI (& also wrote the info. page 😉 ). The JMF installer download is becoming hard to find, but you can get the mp3plugin.jar direct from where I put it for use in JWS apps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying run a program from a qmake .pro file which modifies the
When trying to run an Eclipse Dynamic Web Project under a Tomcat setup using
I converted a local sound file to a resource, which built this in my
I'm trying to play background music along with sound effects using Qt. However, I
This may sound as a simple question for many, I am trying to understand
I'm trying to use the MPMoviePlayerController class on the iPad. Here's my code: multimediaPlayer
I'm trying to get a sound file to be printed on a php page.
This may sound complicated but I can answer any questions. What I am trying
I'm trying to run this query: SELECT Destaque.destaque, Noticia.id, Noticia.antetitulo, Noticia.titulo, Noticia.lead, Noticia.legenda, Noticia.publicacao,
this will sound silly but i am executing my code from command prompt and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.