How to start with coding process of compiere in Eclipse...

To err is to be human, to help each other is joy. Tell your Compiere needs in your own words. Let's figure out together.

Moderator: azaharizaman

How to start with coding process of compiere in Eclipse...

Postby gaurav » Wed Aug 03, 2005 3:00 pm

Hi All
How can i start with coding process of compiere in Eclipse. I have downloaded compiere code and want to add new module of HR.But i am facing problem where to start as i can see many "public static void main() "
How can the code be understood?

A lot of funcionality of compiere is clear to me and i am now fimiilar to a many processes of compiere.

Please help.

Thanx

Reagrds,
Gaurav
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby karsten-thiemann » Wed Aug 03, 2005 5:18 pm

Hi Gaurav,

the class to start the client from eclipse is org.compiere.Compiere in the project dbport.

Hope that helps,
Karsten
karsten-thiemann
 
Posts: 9
Joined: Thu Jul 21, 2005 11:17 pm
Location: Berlin - Germany

Thanx Karsten

Postby gaurav » Wed Aug 03, 2005 7:29 pm

Thanx Karsten
Got It

Regards,
Gaurav
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby gaurav » Wed Aug 03, 2005 7:42 pm

Hi Karsten
I have imported compiere code into Eclipse but it is giving me 100 erors and also not recognizing packages .What i did....I imported folder named compiere-all and all the files and packages in this folder has been imported.
Please tell me what is the right way of importing the code in Eclipse so that it does not give me any error.
I guess the folder named client,db,compiere,data etc etc are various projects according to eclipse.
Pls Tell me how to import them all??

Thanx

Regards,
Gaurav
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby karsten-thiemann » Thu Aug 04, 2005 3:40 pm

Hi Gaurav,

yes you are right, the folders are seperated eclipse projects and I you have to import each seperatly.
Just follow these steps (should work...)

1. Unzip Compiere source: the result is the compiere-all folder

2. Edit the file compiere-all\utils_dev\myDevEnv.bat
copy and rename myDefEnvTemplate.bat and set the following values according to your needs:
- @SET JAVA_HOME=C:\j2sdk1.4.2_06
- @SET COMPIERE_SOURCE=C:\Compiere\compiere-all
- @SET COMPIERE_ROOT=C:\
- @SET COMPIERE_INSTALL=C:\Install
- SET KEYTOOL_DNAME="CN=myName, OU=myName, O=myOrg, L=myTown, ST=myState, C=US"

3. Run RUN_build.bat from the compiere-all\utils-dev folder. That will create some *.jar (and lots of other files...) that you will need later

4. Import all compiere projects (base, client etc.) into eclipse

5. After the import of all projects you have to set some Classpath Variables (here you need the created *.jar):

CCLIENT - compiere-all\lib\Compiere.jar
CTOOLS - compiere-all\lib\CCTools.jar
INTERFACES - compiere-all\interfaces\Interfaces.jar
JTDS - compiere-all\tools\lib\jtds-1.0.jar
ORACLE - compiere-all\lib\oracle.jar
PDF - compiere-all\lib\jPDF.jar
POSTGRESQL - compiere-all\tools\lib\postgresql.jar
ROWSET - compiere-all\tools\lib\rowset.jar
SYBASE - compiere-all\lib\sybase.jar
TOOLS_LIB - compiere-all\tools\lib

6. Rebuild all projects and than you are (hopefully) done

Bye,
Karsten
karsten-thiemann
 
Posts: 9
Joined: Thu Jul 21, 2005 11:17 pm
Location: Berlin - Germany

Postby gaurav » Thu Aug 04, 2005 6:28 pm

Hi Karsten,
Thanx for the reply.
I followed the steps and got no error in first two steps,but in third step i.e running Run_Build.bat rom the compiere-all\utils-dev folder....it ran for few minutes and at last generated error saying failed to send e-mail and moreover i cannot see and *.jar file being created.Does it create .jar file in various folders??
2. Regarding fourth i.e. Importing all compiere projects , if i select whole folder like "base" it also imports bat file and other files in that folder and then if import new project like "client" it asks me for overwriting existing files like bat files, .classpath,.project etc....What to do at that time? Overwrite or not?
3. Then what i did...i deleted all files from eclipse and again iported all projects but src folder only of all the projects.
4. Regarding setting classpath variables ......where to set them in eclipse?I cant see and .classpath file here

Please solve this problem and guide me how to proceed further.

Thanx alot

Regards,
Gaurav
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby gaurav » Thu Aug 04, 2005 8:01 pm

Hi Karsten,
Thanx for the reply.
I followed the steps and got no error in first two steps,but in third step i.e running Run_Build.bat rom the compiere-all\utils-dev folder....it ran for few minutes and at last generated error saying failed to send e-mail and moreover i cannot see and *.jar file being created.Does it create .jar file in various folders??
2. Regarding fourth i.e. Importing all compiere projects , if i select whole folder like "base" it also imports bat file and other files in that folder and then if import new project like "client" it asks me for overwriting existing files like bat files, .classpath,.project etc....What to do at that time? Overwrite or not?
3. Then what i did...i deleted all files from eclipse and again iported all projects but src folder only of all the projects.
4. Regarding setting classpath variables ......where to set them in eclipse?I cant see and .classpath file here

Please solve this problem and guide me how to proceed further.

Thanx alot

Regards,
Gaurav
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby trifon » Thu Aug 04, 2005 8:39 pm

Hi Gaurav,

First error is because build process at the end is trying to send email anf fails, but this is not huge problem. Everything is build. Build process copies installation into folder specified by variable "COMPIERE_INSTALL"

You can download http://red1.org/compiere/eclipsefiles.zip.
This are eclipse project file and i think that they will help you to compile your project.

Regards,
Trifon
Trifon Trifonov
trifon
Senior
 
Posts: 324
Joined: Thu Dec 23, 2004 11:20 pm
Location: Bulgaria, Sofia

Postby gaurav » Fri Aug 05, 2005 5:07 pm

Hi Trifon
Thanx for reply.
But the problem has still not solved.U can see to my last posting reagrding my problems being faced:)
And the link that u gave me is also not working http://red1.org/compiere/eclipsefiles.zip.
It says Roses are Red and voilets are blue something like that.....and i refreshed thepage and logged in red1 again but not solved:)

Thanx

Regards,
Gaurav
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby trifon » Sat Aug 06, 2005 5:05 am

Hi Gaurav,

Try this link:
http://red1.org/compiere/eclipsefiles.zip

About error in build process, you can ignore it.

Regards,
Trifon
Trifon Trifonov
trifon
Senior
 
Posts: 324
Joined: Thu Dec 23, 2004 11:20 pm
Location: Bulgaria, Sofia

Postby gaurav » Sat Aug 06, 2005 1:36 pm

Hi Trifon,

I have replaced these two files .classpath and .project with the files in project(workpace) in eclipse.Now theerrors has been redused to 64 from 100.The errors are like "Project compiere is missing required library: 'compiere/jboss/bin/run.jar'" and many other like this but these jar files exist in the path where it is giving error.

What could be the possible problem??

Thanx Trifon

Regards,
Gaurav
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby gaurav » Tue Aug 09, 2005 7:01 pm

Hi

I am able to compile and run the Compiere code in Eclipse.But still it is giving me 100 warnings.But the code is executable.
Another problem i am facing is that in.classpath file it gave me error on <classpathentry kind="src" path="serverRoot/src/main/client"/>
whereas i found that client folder does not exist in serverRoot/src/main.
I created this folder manually but nothing happened.So I deleted this line from .classpath file and hence able to execute the code without error but 100 warnings.
What should be done with this line??
What si its singnificance?

Thanx

Regards,
Gaurav
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby karsten-thiemann » Wed Aug 10, 2005 4:31 pm

Hi gaurav,

most of the warnings result from the fact that the serializable compiere classes don't have a serialVersionUID. Just don't care. To hide this warnings in eclipse just go to Window/Preferences/Java/Compiler/Errors/Warnings select 'Potential programming problems' and set 'Serializable class without serialVersionUID' to ignore.

Karsten
karsten-thiemann
 
Posts: 9
Joined: Thu Jul 21, 2005 11:17 pm
Location: Berlin - Germany

Postby gaurav » Wed Aug 10, 2005 8:33 pm

Hi Karsten
First of all Thanx for ur help...
I went to the path given by you Window/Preferences/Java/Compiler/Errors/Warnings but I couldn't found Errors under Compiler and hence Warnings too.
There is only Compiler and no nodes under it.....
What to do?
Thanx

Regards,
Gaurav
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm

Postby karsten-thiemann » Thu Aug 11, 2005 3:28 pm

Hi Gaurav,

if you use eclipse 3.1 you should find the nodes 'Building', 'Errors/Warnings', 'Javadoc' and 'Task Tags' under 'Compiler'. You have to select 'Errors/Warnings' and there you have to open 'Potential programming problems'.

I hope that helps
Karsten
karsten-thiemann
 
Posts: 9
Joined: Thu Jul 21, 2005 11:17 pm
Location: Berlin - Germany

Postby gaurav » Thu Aug 11, 2005 3:46 pm

Hi Karsten
Ya I am using Eclipse3.1 but there is not any child node of Compiler.It is a single node and no child node associated with it.
Ye i can see others like "JUnit" "Task Tag" etc.. but not compiler's child node...:)
What should be done ?

Thanx

Regards,
Gaurav
gaurav
 
Posts: 38
Joined: Wed Aug 03, 2005 2:48 pm


Return to Ask RED1 personally

Who is online

Users browsing this forum: No registered users and 2 guests

cron