I had this crazy idea of creating a media player using java that would stream files from from my desktop computer, which I would set up some sort of server app for, and talk to a portable client app that I could download on any of the other computers on campus. This way I can always have my music playing without having to have my ipod. I just had a question of where should I start? I know a little about networking, I have created a simple instant messenger but that is about it. I don't know what class I need to implement to transfer songs, rather than text like in my instant messenger. What are some good ideas?

10 Years
Discussion Span
Last Post by Phaelax

This is usually the first site I point people to when they want to make a java music player.

Actually I already have downloaded the javazoom classes and that works perfectly but I am contemplating how to go about streaming the music files from my desktop. I been reading the FileReader class api but I still can't tell which classes I SHOULD use to get it to work.


I know the javazoom packages will allow you to listen to a stream, but I haven't dealt with actually creating the stream itself (though I been meaning to do so). I know it'll connect to ice/shoutcast streams, so maybe that's something to look at.

This should play a stream:

BasicPlayer player = new BasicPlayer();

URL url = new URL("");

AudioFileFormat aff = AudioSystem.getAUdioFileFormat(url);

if (aff instanceof TAudioFileFormat)
	Map props ((TAudioFileFormat)aff).properties();
	String title = (String)props.get("mp3.shoutcast.metadata.icy-name");
	String sUrl = (String)props.get("mp3.shoutcast.metadata.icy-url");
	String genre = (String)props.get("mp3.shoutcast.metadata.icy-genre");
	String bitrate = (String)props.get("mp3.shoutcast.metadata.icy-br");


How you stream the song from your own computer I'm not sure. You might need to run an icecast server.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.