The Red5 plug-in for Eclipse has recently been brought to my attention by none other than Chris Allen from the Red5 team (!), so after my recent near miss with getting a simple Red5 app up and running, this got me excited enough again to have another crack at it.
Unfortunately though after another reasonable effort today I’ve again fallen short of actually getting a “Hello World” app to run.
It seems to me that Red5 and the Red5 Eclipse Plug-in will be amazingly useful and productive tools down the line, but they’re just not quite there yet. Plus the current quality of information surrounding the project seems quite disparate, so finding the most useful or most up-to-date information can be a bind.
FMS still definitely has a few key points over Red5:
- Its easy to setup FMS and get an app running, whereas doing the same in Red5 is still beyond my (perhaps somewhat limited) powers.
- FMS has clear branding on the product and (for me at least) gains a certain amount of perceived reliability by its association with Adobe. Even though Red5 is set (in my view) to be a far superior product, I think without the vision of a talented brand/product manager it could be in serious danger of being overlooked by large swathes of the Flash community who just don’t realise how good it is/how easy to use it will be.
In the meantime I hope Java newbies (like myself) don’t get too disheartened with it due to its current problems, as once the team hit that monumental version 1.0 milestone its all set to be something truly awesome.
Installing Red5 Eclipse Plug-in
Go to the download tab of this Flex app and if using Eclipse 3.3, follow the instructions. If however (like me) you’ve recently downloaded Eclipse 3.4, do this instead:
Go to “Help/Software Updates…”
Click on “Add Site” on the right to bring up this dialogue:

Copy and paste this url: http://www.red5.org/projects/red5plugin/update_0.1.x/ into the text field and press OK.
This url should now appear in your available software list as below. Make sure its selected.
Now click “Install…” at the top right. This will bring up a slightly odd Install dialogue with nothing in it, but continue unperturbed.
![]()
Installation will take a few minutes and should prompt you to restart Eclipse on completion (which you should do).
So that wasn’t quite what we were expecting from the online instructions, but it wasn’t too difficult to figure out and Eclipse has been updated recently so fair enough.
Creating a Red5 Web Project in Eclipse
The next thing you should do is watch this tutorial on creating a Red5 Dynamic Web Project by Dominick Accattato.
If you’re using a Mac and Eclipse 3.3 this tutorial is probably fine for you, but if you’re on a PC and using Eclipse 3.4 like me, you’ll need to be aware of the following:
There will be another step in Eclipse 3.4 in the project creation process regarding targeting the Red5 runtime. You will need to press “Next” and browse to your install of Red5 (so for me its: C:/Program Files/Red5) and click “Finish”.

The next difference between Eclipse 3.3 and 3.4 is instead of clicking “Next” as per the tutorial to go to the Project Facets, you need to select the “Modify” button next to Configuration on the same screen:

Selecting the “Red5 Application Generation” option is much the same when you get there though. You should be able to click finish at this point and watch in wonder as it creates your server side Java app and client side Flex app. No more wondering what files to include then.. how cool is that..!?!
Running your server side app in Eclipse
When the example video goes to “Run As/Run On Server”, if you’re in Eclipse 3.4 you’ll need to click “Next” rather than “Finish” and you’ll be presented with this screen:
Like before you’ll have to browse to your Red5 installation, and if you’re on a PC you’ll need to select “red5.bat” rather than “red5.sh” and “red5-shutdown.bat” rather than “red5-shutdown.sh”.
So I’m feeling pretty pleased with myself that I’ve made it this far, but then when I finally go to run the app I’m confronted with “Server port In Use 5080-Http”:
After some discussion and head scratching we decided to look in “Start/Settings/Control Panel/Administrative Tools/Services” where we find Red5 is already running. So I told it to stop by clicking the link below:

Then tried again, and got this problem…

So then we look at the “red5.bat” startup script in “C:\Program Files\Red5″ and begin to wonder if the JAVA_HOME variable isn’t specified…

Then we right click on My Computer, select “Properties/Advanced/Environment Variables” and scroll through the list to find JAVA_HOME isn’t specified…

…so we set it to the path of the JDK I downloaded in the previous tutorial, press OK, restart the machine (just to be sure) and try again.
Still no cigar.
Then, just as I’m about to give up I spot this at the bottom of my Java EE perspective in Eclipse:

So I clean my server and run it again, but it still doesn’t work… :’(
Hopefully this’ll help prevent others from having to figure this all out for themselves, but I’m afraid after a day at this I’m going to have to admit defeat and actually get on with some work. The really annoying thing is that it would be so cool if I could only get it to work..!
I’m going for a lie down in a darkened room now, but if you have any ideas please let me know.
November 12, 2008 at 9:38 pm |
[...] out I could have saved a lot of time by reading Robert Silverton’s blog, where he details pretty much exactly what i’ve gone through. Doh! A short message to the Red5 developers: You’ve [...]
November 14, 2008 at 12:57 pm |
I had the same problems when I was setting up the red5 plugin for the first time as well.
You’re almost there solving those issues. JAVA_HOME should point to the root of your java installation. That means “C:\Program Files\Java\jdk1.6.0_07\” instead of “C:\Program Files\Java\jdk1.6.0_07\bin\java.exe”
That should solve the “The system cannot find the path specified. Press any key to continue . . .” error.
Hopefully this will help getting you started
November 18, 2008 at 7:13 am |
Thanks Paul
This error has been solved, but other problems come afterwards.
(Red5plugin seems to work out of the box under macosx)
Red5 doesn’t start properly from eclipse under winxp.
I had to use tcpview ( http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx ) to close java processes, and i’ve run red5 manually with the wrapper.
to be continued…
November 19, 2008 at 5:13 pm |
[...] The next issue after the JAVA_HOME issue… You’ll see in this previous post that I ran into a fair few issues trying to get the Red5 Eclipse plug-in working, as have a several [...]
December 3, 2008 at 5:06 pm |
[...] are confusing for any other reason, the “Installing Red5 Eclipse Plug-in” section of this post may help you. Make sure to download the version that targets v0.8 of the [...]
August 3, 2009 at 2:02 am |
I really like the Jedai framework (fantastic inclusion to the red5 community), but i have a problem where i don’t know how to use it to develop applications, and was wondering if anyone knew of where to find some examples in flex i could view to see to give me an idea.
I have the red5plugin with eclipse galileo installed and components showing, but how can i modify, database connectivity, video streams, etc.
I am knew to red5, java & flex, and this question might come across as daft, but any tips or help would be much appreciated.
October 21, 2009 at 8:28 pm |
these are the variables to set in enviroment variables:
click start-> right click computer resources->properties->advanced->enviromentvariables.
set in system variables
CLASSPATH = . (point)
JAVA_HOME=C:\Programmi\Java\jdk1.6.0_07 (for example)
PATH= you must add after the ; the path to bin directory of jre
for example
PATH=C:\Programmi\Java\jdk1.6.0_07\jre\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
JAVA_VERSION=1.6
i need some tutorial on how to write the first application