jSomaPlayer is a pure java shoutcast stream player (mp3) for the soma fm web radio. It can be used in command-line mode but it can also be controlled via a web browser since it includes a small web-server (jReflect). The browser GUI is optimized for mobile devices (using jo javascript framework). Works perfectly on the Raspberry Pi.


  • Lightweight and easy-to-use player
  • Automatically updates current soma fm channels
  • Displays stream and title info
  • Platform independend, works nicely on the Raspberry Pi (GPIO library included)
  • Player instance can be controlled remotely by any web browser.
  • Remembers last channel played
  • Manage custom shoutcast channels
  • Monitor internet connection and restart player if needed
  • Remote control via webinterface

jSomaPlayer targets the Raspberry Pi since it uses Pi4J (http://pi4j.com).



Start with java:

java -jar jSomaPlayer.jar [options]


  • -play (start only player, no web service).
  • -if:[interface name, e.g. wlan0], linux only

Other options: see below.

Example: java -jar jSomaPlayer.jar -if:wlan0 -gpin:32 -gpout:7


jSomaPlayer on the Raspberry Pi

GPIO options on Raspberry Pi (e.g. in command-line mode):




(n,m are integer numbers)


Example Raspberry Pi: java -jar jSomaPlayer.jar -play -gpin:32 -gpout:7

(start in command-line mode, use input pins 3 and 2 to switch channels,

use output pin 7, e.g. for LED light).


Notes & Troubleshooting

- See http://pi4j.com/usage.html for more information about GPIO.

- Make sure to use an ARM optimized JVM, see 


(Player typically uses about 30-35% CPU on the Pi)

- If sound doesn't work (Source Data Line problems) try "sudo modprobe snd_bcm2835"






SomaFM commercial free internet radio


Icons provided by http://www.glyfx.com.


jReflectServer 2.0
New version released | 1/4/2017

jReflectServer (formerly jReflect) has been updated. Version 2.0 allows distributed code ... Read More

Instantly backup your files on change | 3/21/2014

DocuCast is a real time file revision and backup system for use in professional and private ... Read More

jReflect: lightweight java web-server & -framework

jReflect is a very small & lightweight java web-server and -framework for ... Read More

More Blog Entries