JRadius Development In Eclipse
Install Eclipse, Maven, and plug-in
Install and setup eclipse, maven, and the eclipse-maven plug-in.
Getting JRadius
Download the project from SVN.
svn co http://dev.coova.org/svn/cjradius/
In the cjradius directory, copy the build.properties.template file to build.properties and edit it to match your system. Now, if you have maven installed, you should be able to build using either ant (or maven, but here we use ant).
cd cjradius cp build.properties.template build.properties vi build.properties ant dist
When successful, you will find both jradius.jar and jradius-dictionary.jar in directory dist/.
Creating an Eclipse project
|
Create a new project from the File menu, selecting New->Project as shown. The next screen will ask what kind of project, make it a Java Project and click Next. |
|
When setting up the project, give it a name (jradius in this example) and select Create project from existing source and browse to find the cjradius directory created when you checked out the SVN project. Then click on Next. Eclipse will try to find all the source directories it can, but it does not always find them all. |
|
In the Source tab of the Java Settings screen shown on the right, you'll see that the java/extended and java/tests directories were found and added as source directories. However, there are more directories to add. Scroll down and look in the java directory. Find and add the java/src and java/example directories (also java/applet if you want) as source directories as shown below. | |
|
Now, go to the Libraries tab and click on Add JARs. A new window will appear showing all your projects. Find the project you are creating, jradius in this case, and you should be able to find jradius-dictionary.jar in the dist directory - created earlier using ant. Click on the jar file, the on OK. Now finish creating the project by clicking Finish from the Java Settings window. Note: You need the JRadius dictionary jar in your project because classes in the extended source directory depend on it. |
|
Now with the project created, you will have errors because of missing dependencies. Go over to the Package Explorer and right-click on your project. If you have installed the maven plug-in for Eclipse, you will see a Maven2 menu which contains the option Enable. Select this option and the dependencies will be automatically added to your project. Now your project should compile without any errors. (If you do not have the maven plug-in, you can add all the jars found in java/lib, put there by ant using maven during ant dist, to your project by hand). What next? Read the following: |
![[Main Page]](/wiki/skins/common/images/coova.gif)





