Hey, Does anyone see anything wrong with this? I don't know what's up, it's throwing the IOException everyt time even though the mp3 is in the source folder. (I tried .wav as well). I'm trying to place this in a GUI, but testing it seperately first.
import java.io.*;
import sun.audio.*;
import java.io.File;
import javax.swing.*;
import java.awt.event.*;
public class Test2 {
public static void main(String[] args) {
AudioPlayer player = AudioPlayer.player;
AudioStream stream;
AudioData data;
ContinuousAudioDataStream loop = null;
InputStream input = null;
try
{
input = new FileInputStream("GarageBand.mp3");
stream = new AudioStream(input);
data = stream.getData();
loop = new ContinuousAudioDataStream(data);
player.start(loop);
}
catch(IOException err)
{
System.out.println("fle not found");
}
}
}