you must set javaSE 1.6 not 1.7!
shoutcast player in java
Question
i want to create a java program which can play shoutcast radios. I started with javazoom but it displays an error about invalid http. Also i download jlGui(from the same site) and it has the same problen as my program which i create. Finally i try a lot of radio stations but i have the same problem. if anyone knows another way or some java libs i will appreciate it! thanx
import javazoom.jlgui.basicplayer.BasicController;
import javazoom.jlgui.basicplayer.BasicPlayer;
import javazoom.jlgui.basicplayer.BasicPlayerEvent;
import javazoom.jlgui.basicplayer.BasicPlayerException;
import javazoom.jlgui.basicplayer.BasicPlayerListener;
try {
player = new BasicPlayer();
playerControl = (BasicController) player;
player.addBasicPlayerListener(this);
try {
playerControl.open(new URL(streamurl));
} catch (MalformedURLException ex) {
System.out.println("aaa");
}
playerControl.play();
playerControl.setGain(0.85);
playerControl.setPan(0.0);
} catch (BasicPlayerException ex) {
System.out.println(ex);
}
error message
javazoom.jlgui.basicplayer.BasicPlayerException:
java.io.IOException: Invalid Http response
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow