Create Server-Side Java Applications with Red 5
Creating Java applications using Eclipse
1. Download all necessary componenets
a. Red 5 Server (www.osflash.org)
b. Java JDK 1.6 (java.sun.com)
c. Eclipse (www.eclipse.org)
2. New Java Project
a. Select Red5 Folder
b. Delete “test” folder (not used)
3. Window >> Preferences >> Java >> Installed JREs
a. Add : Select root of JDK
b. Check JDK 1.6
4. Switch to Ant View
a. Execute build.xml in root of Red 5
b. Execute: all, jar, server
5. Standalone version of server will then be running
The
server can also be started by clicking Red5.exe, which currently
appears to work fine and is the easiest solution. The Server can also
be started by Adding External Jar, Red5.jar then navigating to
standalone.class and executing as Java Application
1. Create a new Java project.
2. Delete src folder and create a ‘WEB-INF’ folder with 2 more subfolders named src and classes.
3. Right click src folder then - Build path >> use as source folder.
4.
Right click main project folder then - Properties >> Java build
path >> Source tab and change default output folder to
classes.
5. On the same options page select the
Libraries tab and Add External Jar’s. Select the red5.jar located in
the top level of Red 5.
6. Add a new class to your src folder; give it appropriate path and class names.
7. Enter the code for your server-side application in this class.
8.
Navigate to Red 5 >> Doc >> Templates >> MyApp
>> WEB-INF copy the four files into your newly created WEB-INF
folder.
9. Refresh your project in eclipse so you can now see the four files.
10.
Open red5-web.properties: change “myapp” to the new name you wish to
call your project in your Red 5 webapps folder (we have not created
this folder yet, chose a new name). If placing on the server change
“virtual host” to “host, 192.168.3.200”
11. Open
red5-web.xml: change the node Bean with ID web.handler to the class
path of your class you specified in step 6. Ex: com.package.classname
12. Open web.xml: change the webAppRootKey node to the application name you chose in step 10.
13. Create a new folder using the same name you pointed the XML files to.
14. Copy the WEB-INF folder from your folder for this project into your newly created folder.
15. Copy the new folder you created onto the server in Red5 >> Webapps
16.
Restart the Red 5 Server and your program will be ready to use. Access
it using http://staging.local/~mttuser/Red5/DEV_Deploy/nameofswf.swf
Help Files & Tutorials
1. http://www.newviewnetworks.com/nvnhome/blog/client/rss.cfm?mode=full
a. Dominick’s Perspective (developer blog)
2. http://www.ff9900.org
a. Chris Allen’s Blog (developer blog)
3. http://www.brightcove.com/title.jsp?title=823375949&channel=5957394
a. Video Post of Conference Red 5 Startup

