Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4929782

Java Sound Demo: sound files are not loaded if working directory is different

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 5.0
    • client-libs

      The Java Sound Demo installs a directory JavaSoundDemo that contains JavaSoundDemo.jar and a subdir audio with sound files. If the Java Sound Demo is started with java -jar JavaSoundDemo.jar while the current working directory is JavaSoundDemo, it works like expected. However, if the demo is started from a different directory with a command like java -jar dir/dir/javaSoundDemo/JavaSoundDemo.jar, the sound files are not loaded (there is not list of filenames on the left side of the JukeBox tab. I suppose this is because the JavaSoundDemo uses filenames relateive to the current working directory to locate the files. If this is the case, a solution migt be to include the sound files into the .jar and load them from there.

            amenkov Alex Menkov
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: