Menu

eclipse_project

Kevin Moye

Creating an Eclipse project for Streambaby

This Wiki summarizes the steps needed to create an Eclipse project for Streambaby. Note that this is based on older Eclipse IDE installations, so may vary a little for new versions.

REQUIREMENTS

Eclipse IDE installation
svn client

PREPARE ECLIPSE WORK AREA

  • Create a "streambaby" folder alongside where all your other Eclipse top level project folders are
  • If you have a Sourceforge account and streambaby project write permissions, populate new work area using:
    svn checkout --username=USERNAME https://svn.code.sf.net/p/streambaby/code/ .
  • Ordinarily, though, for read only copy of the current repository
    svn checkout svn://svn.code.sf.net/p/streambaby/code/ .

The above should populate the work area with all the source from streambaby repository.

ECLIPSE SETUP

Now that the work area is created, you need to make Eclipse aware of it as follows:

  • File->New->Project

    • Java Project
    • Project name: streambaby
    • Contents = Create new project in workspace
    • Finish
  • After the above you should see "streambaby" project entry and you will get a red x indicating there is some problem related to jmdns which you can fix as follows:

  • click on the top level "streambaby" entry and choose Project->Properties
  • Click on "Java Build Path" and then on "Order and Export" tab and move the "JRE" entry at the very bottom to be located right after "streambaby/main/src"
  • Next move "jmdns.jar" entry to just above the "JRE" entry and then OK the form.
  • Now the project should compile cleanly and the jmdns related problem should go away

RUNNING STREAMBABY FROM ECLIPSE

NOTE: It's not really practical to run streambaby from Eclipse because you will get errors about missing Classes since streambaby relies on the jar file to work properly. If you just want to test if you can start streambaby from Eclipse you can do as follows:

  • If you don't already have a working Streambaby installation that can be used for running streambaby you should donwload the current zip file from Sourceforge and install it the normal way.
  • Edit streambaby.ini and add the following property (this is important to later be able to run from Eclipse):
    streambaby.dir=/path/to/this/streambaby.ini

  • Make sure this installation of streambaby works

  • Now in Eclipse setup a new "streambaby" run configuration as follows:
    name = streambaby
    Main = com.unwiredappeal.tivo.streambaby.StreamBabyMain
    Arguments = com.unwiredappeal.tivo.streambaby.StreamBabyStream
    VM arguments = -Djava.net.preferIPv4Stack=true -Xmx256m -Xmx256m
    Working directory = <same as streambaby.dir above>

But as warned above, you're going to run into trouble. So best option is to build using ANT and then copy streambaby.jar over or unzip the zip file created under "dist" folder to somewhere.

COMPILING STREAMBABY USING ANT

If you want to prepare/compile streambaby outside of Eclipse you can use "ant" with the existing build.xml file to do everything easily for you:

  • From the svn work area where you did svn checkout execute the following:
    ant

  • Following a successful compile the above will make a zip file under the dist directory which is a full distribution of streambaby that can be used by others.


Related

Wiki: Home

MongoDB Logo MongoDB