...
Normally we start OFBiz with the command line
Code Block |
---|
{{%JAVA_HOME%\bin\java \-jar ofbiz.jar}} |
To start in debug mode use the command line
Code Block |
---|
{{%JAVA_HOME%\bin\java \-Xdebug \-Xnoagent \-Djava.compiler=NONE \-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8091 \-jar ofbiz.jar}}\\ |
This changed command line instructs java to run in debug mode listening for a socket connection on port 8091 for a debugger to connect. You can change the port number to any port not otherwise being used.
...
- In Eclipse choose Run->Debug... from the menu. A Debug window should pop up.
- Select
Remote Java Application
from the tree on the left. - Click
New
(button on the bottom left). - Type a name at the top (OFBiz, perhaps?)
- On the Connect tab
- Pick
ofbiz
for the project - Select
Standard (Socket Attach)
for Connection Type - Type
localhost
for host - Type
8091
(or whatever port you chose) for port
- Pick
- On the Source tab
- Click
Add Projects...
(buttons on the right) - Select the ofbiz project
- Click
- Click
Apply
If you have OFBiz running debug (Step 1 above) you can start debugging by clickingDebug
(on the bottom) now.
You know that you are connected when you see a start/stop button in the debug perspective of Eclipse.
...
...
First
...
created
...
by
...
Jarrod
...
Ribble
...
Anchor | ||||
---|---|---|---|---|
|
...
- Select OFBiz project, right-click on it -> Run As -> Run ... (alike for Debug)
- Select Java Application and click on New
- Set Run configuration name to OFBiz
- Main tab:
- Project: OFBiz
- Main class: org.ofbiz.base.start.Start
- Arguments:
- VM arguments: -Xms(minValue)M -Xmx(maxValue)M (typically minValue = 128, maxValue = 512, more is better of course) -Duser.language=en
- In some case (Suse SL 10.1 at least) it's better to not define any VM arguments but let the defaults values.
- Working directory: Use default working directory
- VM arguments: -Xms(minValue)M -Xmx(maxValue)M (typically minValue = 128, maxValue = 512, more is better of course) -Duser.language=en
- Classpath
- Bootstrap Entries: JRE System Library
- User Entries: ofbiz.jar from OFBiz project
- Don't forget to remove the entry "ofbiz (default classpath)" else you may have a message "Can't find bundle for base name cache, locale ..."
- Source tab
- Click
Add Projects...
(buttons on the right) - Select the ofbiz project
- Click
- Environment
- Add environment variable LC_ALL=C (Optional, Linux only)
- Main tab:
- Click on Apply and Run (or Debug)
...
...
Thanks
...
to
...
Peter
...
Goron
...
Note that when doing development work, you will have to stop OFBiz, run an Ant build and re-start. Because this method treats OFBiz as a plain Java up, you don't have any automatic classloading as you might be used to when using Eclipse-WTP and developing webapps.
...