java.io.FileNotFoundException: C:\Users\diego\workspace\Super Mario Bros 1\JButton.wav (The system cannot find the file specified)

tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    How to Play .wav File with JButton?

    Stack Overflow | 3 years ago | DiscreteElite_
    java.io.FileNotFoundException: C:\Users\diego\workspace\Super Mario Bros 1\JButton.wav (The system cannot find the file specified)
  2. 0

    Exported Jar file from Eclipse not locating referenced files

    Stack Overflow | 2 years ago | user1104028
    java.io.FileNotFoundException: SoundDir/sonar-beep.wav (No such file or directory)
  3. 0

    Playing an MP3 in a jar with mp3spi

    Stack Overflow | 3 years ago | WhiteWeasel
    java.io.FileNotFoundException: src\resources\audio\test.mp3</p> </blockquote> <p>So I can't use „File“ in a jar because I'm not dealing with a file in the file system but a file inside my jar.</p> <p><strong>2nd attempt</strong></p> <pre><code>URL url = ClassLoader.getSystemResource("resources/audio/test.mp3"); AudioInputStream ain = AudioSystem.getAudioInputStream(url); </code></pre> <p>What happens is:</p> <p>Eclipse IDE: Works fine, the mp3 plays.</p> <p>Exported jar-File: Jar works but mp3 does not play.</p> <p>Exported jar-File opend with windows console: Jar works but mp3 does not play.</p> <blockquote> <p>Error messages: javax.sound.sampled.UnsupportedAudioFileException: could not get audio input stream from input URL
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Url problems with jar

    Stack Overflow | 3 years ago | user3272243
    java.io.FileNotFoundException: /home/user1/NetBeansProjects/project1/dist/project1.jar!/music/2.wav (No existe el archivo o el directorio)
  6. 0

    When using multiple wav files, only one found- java

    Stack Overflow | 2 years ago | misspiggy007
    java.io.FileNotFoundException: 1.wav (No such file or directory)

  1. Lukasmcd14 2 times, last 6 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.FileNotFoundException

    C:\Users\diego\workspace\Super Mario Bros 1\JButton.wav (The system cannot find the file specified)

    at java.io.FileInputStream.open()
  2. Java RT
    AudioSystem.getAudioInputStream
    1. java.io.FileInputStream.open(Native Method)
    2. java.io.FileInputStream.<init>(Unknown Source)
    3. com.sun.media.sound.WaveFloatFileReader.getAudioInputStream(Unknown Source)
    4. javax.sound.sampled.AudioSystem.getAudioInputStream(Unknown Source)
    4 frames
  3. Unknown
    JButtonClick$1.actionPerformed
    1. JButtonClick.playSound(JButtonClick.java:21)
    2. JButtonClick$1.actionPerformed(JButtonClick.java:49)
    2 frames
  4. Java RT
    EventDispatchThread.run
    1. javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    2. javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    3. javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    4. javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    5. javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    6. java.awt.Component.processMouseEvent(Unknown Source)
    7. javax.swing.JComponent.processMouseEvent(Unknown Source)
    8. java.awt.Component.processEvent(Unknown Source)
    9. java.awt.Container.processEvent(Unknown Source)
    10. java.awt.Component.dispatchEventImpl(Unknown Source)
    11. java.awt.Container.dispatchEventImpl(Unknown Source)
    12. java.awt.Component.dispatchEvent(Unknown Source)
    13. java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    14. java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    15. java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    16. java.awt.Container.dispatchEventImpl(Unknown Source)
    17. java.awt.Window.dispatchEventImpl(Unknown Source)
    18. java.awt.Component.dispatchEvent(Unknown Source)
    19. java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    20. java.awt.EventQueue.access$200(Unknown Source)
    21. java.awt.EventQueue$3.run(Unknown Source)
    22. java.awt.EventQueue$3.run(Unknown Source)
    23. java.security.AccessController.doPrivileged(Native Method)
    24. java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    25. java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    26. java.awt.EventQueue$4.run(Unknown Source)
    27. java.awt.EventQueue$4.run(Unknown Source)
    28. java.security.AccessController.doPrivileged(Native Method)
    29. java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    30. java.awt.EventQueue.dispatchEvent(Unknown Source)
    31. java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    32. java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    33. java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    34. java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    35. java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    36. java.awt.EventDispatchThread.run(Unknown Source)
    36 frames