Dear Wiki user,

You have subscribed to a wiki page or wiki category on "James Wiki" for change 
notification.

The following page has been changed by VincenzoGianferrari:
http://wiki.apache.org/james/NetBeansNotes

New page:
= A Rough Guide to James Development Using NetBeans =
Follow these steps to develop James code using the NetBeans IDE. Use the 
NetBeans Help and Tutorials to more fully understand the NetBeans concepts and 
actions described here.

We assume that NetBeans has been downloaded and installed from 
http://www.netbeans.org/. The NetBeans release we refer to is 5.0+.

We also assume that also the James project files have been downloaded  from the 
Apache SVN repository and are available in a directory that we will refer to as 
{{{[james-prj]}}}. We will assume also that a working James server runtime 
instance has been already "deployed" in a directory that we will refer to as 
{{{[james-rt]}}}, and all configuration files are already set in the various 
subdirectories of {{{[james-rt]/apps/james}}}.

In the directory strings shown below substitute the {{{[james-}}}''xxx''{{{]}}} 
entries with the appropriate paths, using the correct OS conventions for 
slashes and backslashes etc.

The following notes apply to both 
https://svn.apache.org/repos/asf/james/server/branches/v2.3 and 
https://svn.apache.org/repos/asf/james/server/trunk as of November 2006.

The goal is to fully use NetBeans for developing, running, debugging and even 
profiling James, in "direct" mode (not "attached").

== Steps to follow ==

 1. Create a NetBeans "General Java Application" project ("File>New 
Project...") as a "Main Project" but without a Main class, and let's call it 
{{{james-nb}}} in the {{{[james-nb]}}} Project Folder.

 1. Select "Properties" from the project pop-up menu.

  a. Go to the "Sources" category, click the "Add Folder..." button and select 
the {{{[james-prj]/src/java}}} folder.

  a. Go to the "Libraries" category.
   i. Choose a "Java Platform" (JDK 1.4 and 1.5 are both ok).
   i. In the "Compile" tab click the "Add JAR/Folder" button, navigate to the 
{{{[james-prj]/lib}}} folder and select all jars.
   i. Again click the "Add JAR/Folder" button and select 
{{{[james-prj]/phoenix-bin/bin/phoenix-loader.jar}}}.

  a. Go to the "Run" category.
   i. In the "Main Class" field enter 
{{{org.apache.avalon.phoenix.launcher.Main}}}. Don't use the "Browse..." button 
as for some reason the right class will not be shown (probably because 
"phoenix-loader.jar" has no ".java" classes).
   i. In the "Working Directory" field enter {{{[james-rt]/bin}}}.
   i. In the "VM Options" field enter (in a single line - no CR): 
    {{{-Djava.ext.dirs=[james-rt]/lib;[james-rt]/tools/lib 
-Dphoenix.home=[james-rt]}}}
    
{{{-Djava.security.policy=jar:file:///[james-rt]/bin/phoenix-loader.jar!/META-INF/java.policy}}}

    Warning: under Windows the {{{[james-rt]}}} entry in the 
{{{jar:file:///[james-rt]}}} url has a special convention to represent a disk 
drive: for example ''C:\james'' must be entered as {{{jar:file:///C|james}}}.
    
 1. Choose "Build>Build Main Project" from the main menu and a new runnable and 
debuggable project will be built in the {{{[james-nb]/build}}} and 
{{{[james-nb]/dist}}} directories.

 1. Now you can either run James choosing "Run>Run Main Project" or debug it 
choosing "Run>Debug Main Project" from the main menu. It is even possible to 
profile James if the "NetBeans Profiler" module has been installed.

Reply via email to