OFBiz in NetBeans 5.0
The NB5 project files for OFBiz 7600+ versions are in nbproject.zip below. They should work without any configuration changes. Just unzip them in ofbiz root folder. In case they don't for you, you can follow the instructions below.
NetBeans 5.0 Notes
- Ctrl-Left Mouse Click on any variable or function jumps to its declaration
- If you haven't discovered NB5's auto-coding features, just press alt-enter on any line with errors. It will give you options and will do the selected ones for you. It will do casts and imports almost all the time.
- To use breakpoints, you must set sources to use: Select Window - Debugging - Sources to open "Sources" window showing all the source root folders. Select any or all as needed
- If you use LCD screen and spend long hours in front of it (like me) you may want sub-pixel font smoothing by running NB5 on JDK1.6 and ofbiz on JDK1.4. The new project files will let you do that. You would need a plugin "Pick a target JDK" from the list below.
- Default start-up settings for NB5 are not right for a project like ofbiz. You need to significantly raise the memory settings. Checkout http://performance.netbeans.org/ .
- You can reduce the footprint of NB5 by turning off some of the built-in server/database stuff.
NetBeans 5.0 Useful Plugins
- Beanshell - get the plugin from http://beanshell.ikayzo.org/docs/display/BeanShell/Contributed+Code+and+Utilities
- Pick a target JDK for a freeform project in NetBeans http://blogs.sun.com/roller/page/jglick?entry=pick_a_target_jdk_for
- Netbeans.org plugins site http://www.netbeans.org/catalogue/index.html
- Sandip Chitale has many useful tools http://blogs.sun.com/roller/page/scblog?catname=%2FNetBeans
- SVN plugin, see this page. After installation, svn is accessible via the Files tab.
NetBeans 5.0 Project Instructions
Use only when nbproject.zip doesn't work for you.
Two steps are required for using OFBiz in NetBeans.
- Create project for external Ant script based project. After this, NetBeans will know how to build the project correctly using the build.xml in the OFBiz root folder.
- Select File - New Project
- Choose Project: Select General in Categories (left panel) and "Java Project with Existing Ant Script" in Projects (right panel) and click Next.
- Name and Location: Browse Location field to select OFBiz root folder. Other fields are filled in automatically. Click Next.
- Build and Run Actions: Should be filled in correctly. Click Next.
- Source Package Folders: You can either select each source package folder (/src) one at a time or edit the nbproject/project.xml manually. I prefer the second method since it's easy to do with the attached sample. Click Finish.
- Configure the project: Without this step editor will show errors in all Java source files although they will build and run correctly.
- Edit the nbproject/project.xml similar to the attached example. You may be able to simply copy "Example project.xml" as project.xml and "Example ide-targets.xml" as ide-targets.xml into nbproject directory and have everything working.
- If you want to run the POS in debug mode use the ide-targets.xml.POS.2 file. JLR 28/5/6
- Set sources to use: Select Window - Debugging - Sources to open "Sources" window showing all the source root folders. Select any or all as needed (it seems that you must be running in debug mode to see files, this point have to be confirmed, I'm a NetBeans newbie. JLR 27/5/6)
- ANother point to confim (but rather sure by experience) unlike in Eclipse when specifying source file for debugging NeBeans is'nt searching recursively (ie you have to give the exact pathes to all your sources) JLR 28/5/6
Test out the configuration by trying out stepping through the code. Note that you can break in the code even if the configuration is incorrect.
The files "Example project.xml", ide-targets.xml.POS & ide-targets.xml
ares deprecated rather use nbproject.zip & ide-targets.xml.POS.2
This page last changed on 28-May-2006 15:37:09 CST by JacquesLeRoux.
Set your User Preferences to Edit This Page