- ADempiere 3.6 Cookbook
- Ajit Kumar
- 554字
- 2021-04-09 21:40:51
Debugging the client version is pretty straightforward and quick. In this recipe, we will see how to configure the project in Eclipse so that we can debug ADempiere when we run it as a client application (the Swing version).
Before we can run ADempiere, there are properties, specific to ADempiere, which need to be configured properly for example, JDK location detail, application server detail, database detail, SMTP detail (for e-mails), and so on. The following steps must be completed to ensure that these properties are set up correctly:
- In Eclipse, open the Open Resource window and select the
Setup.java
file. It is available under theinstall\src\org\compiere\install
package of youradempiere360lts
project. - Right-click on the
Setup.java
file in the Project Explorer and select the optionRun As
|Java Application
. This will launch an ADempiere setup screen.For the client version, we need to set the fields in the following sections of the screen:
- Java
- Adempiere
- Database Server
- Mail Server (Optional)
Click on the Test button and if everything was set correctly, you will see the Ok message at the bottom of the setup screen. In case you get errors, verify the values you have entered. Correct them and Test until you get the Ok message. Any errors during the testing are also shown on this window.
- Click on the Save button. This will create the
Adempiere.properties
file in the Adempiere Home directory. After creating the property file, the program tries to build the code base but fails with a build error. Do not worry! Our intention was to only get theAdempiere.properties
file created, which we will use in our subsequent setups.
Now that we have got the Adempiere.properties
file out, it is a trivial task to be able to debug the application. Here are the steps:
- In Eclipse, open the Open Resource window and select the
Adempiere.java
file. It is available under thebase\src\org\compiere
folder of youradempiere_360
project. This class is the entry point class for the client version. - Add a break-point at Line 594 inside the main method.
- Right-click on the
Adempiere.java
file and select Debug As|
Debug Configuration. This will bring up the Debug Configurations window. - Click on the Arguments tab and specify the following VM arguments:
DPropertyFile="C:\adempiere_svn\tags\adempiere360lts\ADempiere.properties" DADEMPIERE_HOME="C:\ tags\adempiere360lts"
PropertyFile:
Points to theAdempiere.properties
file, which we had created earlierADEMPIERE_HOME:
Points to the Adempiere folder
- Click on the Debug button to start the debugging.
- Use the toolbar on the Debug window to debug the code. This way, you can figure out how the control is flowing in the ADempiere source code and gain a better understanding of the subject.
Adempiere.java
is the main class file which provides the entry point for the desktop version of ADempiere. This is the class where you will find the main
method. To this class, the two important properties—PropertyFile
and ADEMPIERE_HOME
must be passed so that it can read the setup information (database, mail server, JRE path, and so on) and run the application.
- Excel函數(shù)、公式、圖表、數(shù)據(jù)處理從新手到高手
- Autodesk Ecotect Analysis 2011綠色建筑分析應(yīng)用
- AIGC輔助數(shù)據(jù)分析與挖掘:基于ChatGPT的方法與實(shí)踐
- SPSS 28.0統(tǒng)計分析從入門到精通(升級版)
- Capture One 22 Pro高級實(shí)戰(zhàn)教程
- Oracle Enterprise Manager Grid Control 11g R1: Business Service Management
- UG NX 9中文版從入門到精通
- SOLIDWORKS中文版實(shí)用教程
- OpenCart 1.4 Template Design Cookbook
- 神奇的中文版Photoshop CC 2017入門書
- 剪映+Vlog+Premiere短視頻制作從新手到高手
- 行攝 Photoshop CC后期修片高手之道(第2版)
- Photoshop后期強(qiáng):多重曝光專業(yè)技法寶典
- Drupal 7
- Cinema 4D/After Effects印象 影視包裝技法精解基礎(chǔ)篇