JPOSEE IN NETBEANS

On the jpos wiki, there is a tutorial for setting up jposee with eclipse. In this post, I will be setting up the jposee framework with Netbeans.

The easiest way to start is to get the source as directed in this document(jposee pdf). Prerequisite for this tutorial would be java, ant, subversion and of course the netbeans IDE.

Open up a terminal/console and run the following svn check out command.

svn checkout http://jposee.googlecode.com/svn/trunk/ jposee-netbean

svn revision

 

Start up NetBeans. Click on File > New projects

netbeans

Select Java > Java Project with Existing Sources

java_existing_src-1

 

Browse to the folder you check out the jposee source into and click open.

browse

 

Name the project whatever you like. Netbeans creates a nbbuild.xml file because jposee already has a build.xml file. Click Finish.

nb-build-file

 

In Netbeans, click on the file browser and expand the project.

nb-file-browser

Click on the nbbuild.xml file created by the IDE and add the following lines to the bottom of the file

nbbuild-file

The next step would be to compile/build jposee. Go to the project view in netbeans, right click on your project and select build.

build-jposee

This will create the build directory. The next step is to set up the run command properly so that netbeans would be nice to our jposee framework. Right click on the project again and select properties.

nb-properties

 

Click on Libraries. In the Compile tab, select Add Jar/Folder. Browse to the build/lib directory and select all the libraries.

nb-libraries

 

Repeat the above step for the Run tab also. Select the Run in the List of Categories.

Fill in the following fields:  Main Class: org.jpos.q2.Q2 Working Directory : /jposee-home/build

nb-run-config

 

Click Ok and you are done. Run the project by clicking the the Run button or by right clicking the project and selecting Run.

nb-out-log

 

To work on your own module in the module directory, simply add your module's src directory to the source tree in netbeans( Make sure the build/src directory is also added to the source tree).

To do this, you would right click on your project. In the List of Categories, select the Sources node and click on the Add Folder.

Select your module > Click on open.

nb-module

 

Make sure you add the libraries( Jar files ) your module depends on to the Compile and Run tab under the Libraries node.

I hope you find this tutorial useful for your jposee projects......