逸逸记事
逸逸记事

我的分类(专题)

首页(175)
儿子(9)
SIP技术(9)
Web2.0(12)
摄影和DVD(8)
软件开发随笔(18)
名古屋打工生活(11)
微软技术开发(47)
Java技术(12)
加拿大移民生活(20)
生活点滴(6)
第一份工作--上海贝尔(18)
完成项目(13)
回国后的生活(0)


最新日志
独行者
终于知道什么叫外包了
人生悲哀之事
水晶报表中显示动态图片
水晶报表中的简单参数设置
怀念下小黑
dotnet中的数据连接Timeout
老板的思路
又买房了
交通事故

最新回复
回复:独行者
回复:怀念下小黑
回复:老板的思路
回复:mjSip学习笔记
回复:老板的思路
回复:dotnet中的数据连接Timeo
回复:mjSip学习笔记
回复:交通事故
回复:交通事故
回复:又买房了

留言板

签写新留言

您好,很希望问您一个关于jain-sip
生活经历就是最大的财富,羡哦~
java的Web开发问题
回复:疑问
IT还不如妓女呢,呵呵
myjavaserver的空间
求助
您的子域名已开通

统计
blog名称:人在旅途
日志总数:175
评论数量:505
留言数量:13
访问次数:1665551
建立时间:2005年12月7日

链接

 

生命是过客,人在旅途。奶奶是信基督教的,没啥文化,却养育了四子二女,还带过九个孙辈。老人家对生命的看法就是“人都是客人,迟早要回去的。”就以《人在旅途》来纪念她。

 

«August 2025»
12
3456789
10111213141516
17181920212223
24252627282930
31

公告
  本人上传的源程序中可能引用或使用了第三方的库或程序,也可能是修改了第三方的例程甚至是源程序.所以本人上传的源程序禁止在以单纯学习为目的的任何以外场合使用,不然如果引起任何版权问题,本人不负任何责任.




     本站首页    管理页面    写新日志    退出
调整中...
[SIP技术]How to configure Netbeans to compile and debug SIP Communicator
人在旅途 发表于 2006/1/23 15:21:03

How to configure Netbeans to compile and debug SIP Communicator Netbeans is a “pure java” open source project that should (in theory) run on any platform that has a supported java SDK. It is a feature-rich IDE, but has been undergoing an impressive series of changes during 2005, so you should not contemplate running anything older than the latest stable release (and be careful of anything newer!). You can get the latest version from http://www.netbeans.org. Note: Currently, NetBeans 4.1 is the latest production release. Version 5.0 is under development and includes a complete re-write of the CVS support, which is NOT described in this procedure! It also has fixes to many bugs in the debugger environment. Install and test the Anagrams Sample Project NetBeans uses Ant to perform many of its own IDE functions and is tightly integrated with it. We strongly recommend that you install, build, test and debug the sample Anagrams project before starting to work with SIP Communicator. This will prove that you have successfully configured your IDE before you begin work on our complex project. SIP Communicator has its own complex build.xml file, while Anagrams allows NetBeans to create a boiler-plate project. Most of your work will be associated with the integration of the SIP Communicator build.xml and the NetBeans IDE configuration. Download the latest SIP Communicator source from java.net From the NetBeans “Versioning” menu, select “CVS” and then “Check Out” from the submenu. Click the “Check Out” button on the Advanced Command Options popup. The CVS Checkout Options window will open. Click on the “browse” button for the “Working Directory” and choose a location for your CVS sandbox. We recommend a location outside the netbeans installation directory to make upgrades simpler. The default will be the value of your HOME environment variable. (n.b. you are specifying the root where your sip-communicator sandbox will be created, not the sandbox itself). Note: If you already use Netbeans to maintain CVS Sandboxes for projects NOT resident at cvs.dev.java.net, we strongly advise you to setup a NEW sandbox. Netbeans 4.1 CVS support is tricky with multiple CVS repositories, and switching between projects is much simpler if you maintain a separate sandbox for each repository. For example, I have three directories off my HOME directory: netbeans (for the ide itself), SandBox (for my own projects) and SandBoxJavaNet (for SIP Communicator). Fill in the fields as follows… the CVS Server Name is “cvs.dev.java.net”; the repository path is “/cvs” (note forward-slash and case-sensitive text!). Enter your case-sensitive sun java.net userid and password (you must have joined the project with observer rights or higher). Leave the default CVS Server Type as “pserver”, using the default port of “2401″. Check the “Use Built-in CVS client” radio button. and click the “Login” button. The message “you are logged in” should appear just below the password field. Check the “Modules” radio button. You ought to be able to use the “select” button to browse the list of all modules known to the CVS server, but this operation seems to timeout. Enter the project name “sip-communicator-1–0-draft” (case sensitive!) in the module field and click the “OK” button. The checkout should begin and you can follow its progress in the output window. Define the CVS sandbox as a Netbeans Project Left click on the “New Project” menu icon and the wizard window will appear. Choose the “General” Category and then select “Java Project with existing Ant Script”. Click the “next” button. The new project wizard will start running and you should select “Java Project” for the type of wizard and then click the “next” button. Use the “browse” button next to the location field to locate and select the “sip-communicator-1–0-draft” directory in the appropriate CVS sandbox. The other fields (particularly the “Build Script”) should be automatically completed for you. Leave the radio button for “Set as Main Project” checked and click the “next” button repeatedly (without making any further changes), until you can click the “finish” button. The wizard will complete the creation of your new project. At this stage, you have created a new subdirectory called “nbproject” below sip-communicator-1–0-draft. It contains an incomplete Netbeans project.xml file. Shut down Netbeans, then replace your new copy with the latest project.xml file from CVS (in the ide/nbproject directory). Restart Netbeans. Warning! If you do the copy while Netbeans is running, you will be in danger of corrupting your entire Netbeans environment. Clean and Build the project Right-click the sip-communicator project object (from the Projects tabbed pane) and then choose the “Clean and Build Project” sub-option from the pop-up menu. Focus should switch to the Output pane on the bottom part of the workbench and you should see the Ant build messages as they are produced. The build should complete successfully and all unit tests should run without error. (You can also select the “Test Project” target, which will run the unit tests after bringing the Project up to date). Note: If your tests fail the first time after you create the project, you should be able to resolve the problem by rebuilding all the OSGI “bundles”. This is achieved by running the “cc-buildloop” internal Ant target from a command prompt. Running individual tests The build.xml file for SIP Communicator includes some targets that are particularly useful when working with Netbeans (they can be used outside the IDE provided you manually set the Ant “test.name” property). These targets are automatically “wired up” to the project settings when you installed the project.xml file from CVS. (For background information, refer to Editing The Netbeans Project File). You can run an individual test class by selecting a source file (e.g. ConfigurationServiceLick), right-clicking it and choosing the “Run File” Netbeans action. Debugging under Netbeans The build.xml file for SIP Communicator includes a target that is required to debug the project under Netbeans. This target is already “wired up” to Netbeans by the project.xml from CVS. For details, see Editing The Netbeans Project File. To check that debugging is properly configured, open the TestConfigurationService source file (and ignore the compilation errors - we will resolve them in the next step). Set a breakpoint by single-clicking the first statement in the testSetGetProperty() method - it should be highlighted in pink, with a small pink blob in the left margin. Next, click on the ConfigurationServiceLick source file and choose the “Debug File” action. Ant will start running, and then the debug windows should open on the bottom section of the screen. Execution should halt at your breakpoint, and be highlighted in green. You should be able to step into other source files within the project and display objects and fields, as well as the call stack. Resolve compilation problems As mentioned above, you will probably have seen compilation errors when you opened the source file for TestConfigurationService. These were because Netbeans is unable to resolve some of the import statements. This is because the Netbeans source code viewer does not have access to the ClassPath variables setup when Ant runs the project’s build.xml. We hope to overcome this problem automantically, but in the meantime, you can follow this procedure… Open the project properties object. The “java source” view should show the Source Package folder is “src”, and the Test Package Folder is “test”. You must put the jars for ALL project imports in the “Java Sources Classpath” for BOTH the “src” and the “test” source folders. If you don’t know what they are, run “Ant rebuild” with verbose debugging and it will list the ClassPath used for java compilation of the “src” and “test” folders. As you add each jar to each Java Source Classpath and save the properties, you should see the red crosses disappear. ‘To DO:’ We need to modify the CVS copy of project.xml so that it pre-defines the Java Source Classpath and eliminates these errors. Note: You can successfully debug code that shows these errors in the source display window. However, you will not be able to step into any of the methods associated with a red-cross import statement - if you try, Netbeans will simply step over the method instead. Resetting a SIP Communicator Configuration Whenever you change something related to your sip-communicator environment, e.g. using an accelerated JMF or the all-java implementation, you must make sure SIP Communicator goes through the process of detecting the change. See Resetting the SIP Communicator Configuration for details. Good luck!

阅读全文(4915) | 回复(1) | 编辑 | 精华

回复:How to configure Netbeans to compile and debug SIP Communicator
人在旅途发表评论于2006/2/2 15:08:45

结果:失败

个人主页 | 引用回复 | 主人回复 | 返回 | 编辑 | 删除

» 1 »

发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)

站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.297 second(s), page refreshed 144768255 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号