编译运行Red5源代码

来源:互联网 发布:java多线程并发控制 编辑:程序博客网 时间:2024/06/05 19:17

1.安装Eclipse3.3.2
 a.点这里从官方网站下载

 b.解压缩到D:\red5
 c.
进入D:\red5\eclipse,双击eclipse.exe
 d.
选择工程存放目录,设置在D:\red5\code,勾选"Use this as the default and do not ask again"

2.安装Subclipse(Eclipse上的SVN插件)
 a.点这里从官方网站下载

 b.选择Eclipse主菜单中Help->Software Updates->Find and Install...
 c.
选择Search for new features toinstall,单击next,进入插件安装界面
 d.
单击New Archived Site...打开文件选取界面,找到刚才下载的site-1.4.4.zip双击。弹出Edit Local Site界面,单击OK
 e.
回到c画面,单击Finish
 f.
进入Updates界面,勾选"JavaHL Adapter(recommended)""Subclipse(required)",单击next

 g.进入Install界面,选中"I accept the terms in the license agreements",单击next
 h.
单击Finish,弹出新界面单击Install All,再弹出新界面单击YesEclipse重新启动,此时Subclipse安装完毕。

3.red5svn上取出源代码
 a.
选择Eclipse主菜单中Window->Open Perspective->Other,弹出"Open Perspective"界面,选择"SVN资源库研究",单击OK


 b.Eclipse左侧,单击右键弹出菜单,选择"新建"->"资源库位置..."
 c.
进入"添加SVN资源库"界面,在URL中填入:http://red5.googlecode.com/svn/java/server/tags/0_9rc1/,单击Finish
 d.
Eclipse左侧,出现一个条目"http://red5.googlecode.com/svn/java/server/tags/0_9rc1/",右键点击,弹出菜单选择"检出为..."


e.等待片刻,弹出"SVN检出"界面,选中"做为工作空间中的项目检出",单击Finish
 f.
弹出"SVN检出"界面,此时正在从远程SVN服务器取回源代码,等待1N分钟(视你的网速)
 g.
下载完毕,选择Eclipse主菜单中Window->Open Perspective->Java,进入Java编辑视图

4.编译red5源代码
 a.
打开red5_server工程,找到build.xml,右键单击,选择Run As->Ant Build
 b.
Ant引导的编译过程中会利用Ivy下载相关依赖的jar文件(入门推荐学习这篇文章官方教程)
 c.看到BUILD SUCCESSFUL。打开lib文件夹,所有依赖的jar文件都放在里边了。打开工程属性,选择Java Build Path,打开Libraries选项卡,单击Add JARs,选取lib文件夹里所有的jar,单击OK

5.运行red5 Standalone
 a.
找到org.red5.server.Standalone,运行之。
 b.
日志系统使用LogBack