Project.net API

ID #1259

How to setup development environment using community codebase.

Before starting configuring Eclipse IDE make sure that following environment variables are set on your system.

Set system environment variables for Java, Tomcat and Ant as shown below -

For JAVA_HOME ->

For JAVA_HOME

 

For CATALINA_HOME ->

For CATALINA_HOME

 

For ANT_HOME ->

For ANT_HOME

 

Configuring Eclipse IDE for Project.net development environment

Steps-

  1. First set the Java and Tomcat preferences as shown below:

set the Java

 

2. Select y and click on Compiler. Select the Compiler compliance level from the drop down (The Java version you have installed in your system).

 

Java category

 

3. Next click on Tomcat, select the version of tomcat installed in your system.

 

Tomcat Ver

4. Click on Browse and locate the directory where your tomcat is installed .Click on OK and then Apply. Click on OK to complete the preference settings as shown below:

directory

 

Now copy all jar files from core/lib/endorsed to tomcat server endorsed directory with core/lib/jaxb-api-2.1.jar and core/lib/jaxb-impl-2.1.6.jar to tomcat server endorsed directory. You will find endorsed directory at following locations in Tomcat 5 and 6 -

In Tomcat 5

<TOMCAT_HOME>/lib/endorsed

In Tomcat 6

<TOMCAT_HOME>/endorsed

5. Now create a new project as shown below:

             File à New à Click on Project

new project

 

6. Under Java category, click on Tomcat Project and then click on Next.

new project1

 

7. Next enter the project name and uncheck the “Use default location check box”. Click on browse and locate the project directory from your system as shown below. In this case select “trunk” location & click on OK and then click on Finish.

Trunk

 

8. Then the perspective will be prompted as shown below. Select “Yes “and proceed. 

Open

 

9. Right click on the created project “trunk”, and then click on Properties as shown below: 

12

 

10. Click on Java Build Path and then click on Libraries tab as shown below. Then click on Add JAR’s button.

13

 

11. Under the category trunk à core à lib, select all the jar files as shown below. Then click on OK.

14

 

12. It will show all jars under Libraries tab as below now click on OK to complete setting build path.

15

 

13. Now eclipse will automatically start refreshing and building the workspace. Allow it to complete this process which will be helpful for debugging pnet application code.

16

 

14. Once building workspace finished click on Problems tab as shown below and make sure that there are no errors, ignore warnings.

17

 

15. Next add the following arguments in JVM settings to avoid heap space errors. Go to Window and click on preferences as shown below

18

Select JVM settings under Tomcat.

(Note: The parameters appended should be in the same order as shown below. This can be changed as per the system RAM)

 -Xmx512m

-XX:MaxPermSize=384m

-Xss128k

19

After adding these JVM parameters click on Apply and then press OK.

 

16. Open build.properties file with Text Editor present in trunk/core as shown below

20

 

17. Set the following parameters in build.properties file.  First set the Catalina home as tomcat home directory as below –

    catalina.home=C:\\apache-tomcat-5.5.26   (windows)

   catalina.home=/opt/apache-tomcat-5.5.26  (linux)

 

   tomcat.path=/       (for root deployment)

   tomcat.path=/pnet   (for non-root deployment)

   # The location of the application source.

          src.dir=E:\\trunk\\core

 

18. Now open the Ant view, Click on Window à Show View à Ant, as shown below:

21

 

19. Click on Add Build Files in the Ant View as shown below.

      Select build.xml under trunk/core and click on OK.

22

 

20. Now select the build [default] and click on Run as shown below.

23

 

21. After running the project, you should get the message in the console as shown below.

24

 

22. Now start the tomcat server in Debug mode as shown below:

 Click on the button indicated by the arrow (i.e. Debug Tomcat 5.x which is one of the tomcat plugins) and select the “Debug  Configurations” menu item.

25

 

Next click on Browse button and select the project (trunk) for debugging and then click on OK button.

 

26

 

Make sure that the main class is selected as shown below:

27

 

Next click on Arguments tab and set the same arguments as you have set in step no. 15 as shown below and then click on Apply button.

28

 

Next click on Source tab and if you find “Default” project, and then click on Remove button as shown below –

29

 

Next Click on Add button, it will open a “Add Source” window, select “Java Project” as a type of source & then click on OK .

30

 

Now check the project (trunk) under Project Selection window, also check the required options as shown below & then click on OK.

31

 

This will show the trunk project selected under “Source” tab.

 Finally click on Debug button to start the tomcat server in debug mode as shown below:

32

 

You will see console log as below once tomcat server successfully gets started -

33

 

You have finished configuring your Eclipse IDE for Project.net development environment. Now you can check application from browser.

 

 

 

 

Tags: -

Related entries: -

Last update: 2011-07-21 21:53
Author: Naven Kumar
Revision: 1.1

Digg it! Print this record Send FAQ to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this FAQ:

Average rating: 3 out of 5 (1 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry