Page 1 of 1

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

PostPosted: Wed Aug 03, 2005 3:00 pm
by gaurav
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

PostPosted: Wed Aug 03, 2005 5:18 pm
by karsten-thiemann
Hi Gaurav,

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

Hope that helps,
Karsten

Thanx Karsten

PostPosted: Wed Aug 03, 2005 7:29 pm
by gaurav
Thanx Karsten
Got It

Regards,
Gaurav

PostPosted: Wed Aug 03, 2005 7:42 pm
by gaurav
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

PostPosted: Thu Aug 04, 2005 3:40 pm
by karsten-thiemann
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

PostPosted: Thu Aug 04, 2005 6:28 pm
by gaurav
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

PostPosted: Thu Aug 04, 2005 8:01 pm
by gaurav
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

PostPosted: Thu Aug 04, 2005 8:39 pm
by trifon
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

PostPosted: Fri Aug 05, 2005 5:07 pm
by gaurav
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

PostPosted: Sat Aug 06, 2005 5:05 am
by trifon
Hi Gaurav,

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

About error in build process, you can ignore it.

Regards,
Trifon

PostPosted: Sat Aug 06, 2005 1:36 pm
by gaurav
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

PostPosted: Tue Aug 09, 2005 7:01 pm
by gaurav
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

PostPosted: Wed Aug 10, 2005 4:31 pm
by karsten-thiemann
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

PostPosted: Wed Aug 10, 2005 8:33 pm
by gaurav
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

PostPosted: Thu Aug 11, 2005 3:28 pm
by karsten-thiemann
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

PostPosted: Thu Aug 11, 2005 3:46 pm
by gaurav
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