title: stream music with java
body: <p>I am currently coding some chat program and now want to play music via a client command like:</p>
  
  <pre><code>/music http://somewebsite.com/somesong.mp3
  </code></pre>
  
  <p>So the link would be sent from the client that sent the song, to the server. The server should then <strong>without</strong> downloading the song, stream it to every client (they shouldn't download it as well). Problem is, I don't know how to stream mp3's over a TCP based connection.</p>
  
  <p>My question is, if someone could provide me with libraries/tutorials/ideas/code examples of what I need.</p>
  
  <p>As an alternative directly streaming music from one client's computer would be okay as well. If I (as a client) play a song on my machine (using some music player like VLC or similar) and then type a certain command (maybe <strong>/stream</strong>), the sounds from my soundcard would be streamed to the server and then to every client logged in. </p>
  
  <p>It would be awesome if you could provide me with some advice for both, Google didn't really help so far, mainly because I don't quite understand what I should search for.</p>
  
  <p>Thanks in advance!</p>