Saturday, May 17, 2008

Red5 Easier Setup

Like most Java "innovations", Eclipse is a barrier to getting any real work done. After worked for 18 hours or so on my modified Red5, Eclipse decided to throw an OutOfMemoryError on a system with two gigabytes of memory. After the IDE crashed it refused to startup again. I deleted ~/.eclipse and this did not fix the problem. I deleted /usr/local/eclipse and untarred a fresh copy of Eclipse for Java EE developers. This did not fix the problem (the IDE would freeze with 100% cpu usage on the splash screen.) I solved this problem with a program that's not written in Java:

$ rm -rf /usr/local/eclipse

It turns out you can build Red5 much easier without the brilliant and innovative Ecplise IDE. First install Ant. Then install Poison Ivy. Download the Red5 0.7.0 tarball here. Untar the tarball in your favorite development directory (WARNING: the Red5 developers did not add a top level directory in the tarball, therefore you need to create your directory first.)

$ cd dev/javasucks
~/dev/javasucks$ mkdir red5; cd red5;
~/dev/javasucks/red5$ tar xvfz ~/red5-0.7.0.tar.gz

At this point you would normally be able to build red5 without a hitch by issuing the fantastic command:

~/dev/javasucks/red5$ ant

However, the Red5 developers didn't add an ivysettings.xml file to the tarball, even though it's in SVN. So you need to go here and download it. Move the file to the red5 top level directory and you should be able to build red5.

~/dev/javasucks/red5$ mv ~/ivysettings.xml .
~/dev/javasucks/red5$ ant

You can run the resulting standalone server by doing:

~/dev/javasucks/red5$ cd dist
~/dev/javasucks/red5/dist# ./red5.sh

No comments: