Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

OFBIZ in Netbean 6.7

The latest OFBIZ 9.04 can loaded into Netbeans IDE in a few steps. The steps shown here are just one way of doing it, and there are probably other's better ways to accomplish it.

Steps

  1. Checkout a copy of OFBiz from SVN or download a copy of it to your local computer
  2. Fire up Netbeans 6.7 and select "New Project" (Crtl + Shift - N)
  3. The New Project dialog window will popup. Select "Java" from the categories section, and "Java Free-Form Project" from projects section, and hit "Next"
  4. On the next screen set the location to the OFBiz folder and Netbeans will automatically fill up the information for the other fields (Build Script, Project Name, and Project Folder). Hit "Next"
  5. The next screen shows the ANT actions mapping. Leave all settings as it, except change "Test Project" mapping to "run". Hit "Next"
  6. The following screen asks for the location for all the java source files. For the "Source Package Folders" listing, you have to add the "src" folder of each subfolders found in "applications", "framework", and "specialpurpose" folders if present. Example: framework/base/src, applications/accounting/src, etc. Some subfolders may not have a "src" folder, so they can be skipped. This step is a bit tedious, so try selecting multiple "src" folders by holding the "Ctrl" key and clicking on the folder name to add multiple folders at once. Leave the "Test Package Folders" listing empty. Hit "Next"
  7. The next screen shows the listing of java source classpaths. Here you have to add all the *.jar files found in all "lib" folders. Example: framework/base/lib/freemarker-2.3.15.jar. Similar to the previous step, this is very tedious. By adding these classpaths, Netbeans IDE will be able to resolve any reference to external libraries in the OFBiz source code.
  8. Finally, the last screen asks for the output folders for the compiled code. Select all the "build" folders found in the subdirectories of "applications", "framework", and "specialpurpose" folders. Example: framework/base/build.
    #Done

Once the project is created, you can right click on the OFBiz project icon (OFBiz Main Build) and select "Run", "Build", "Clean" to run, build, or clean the program.

Debug Run

TODO

  • No labels

7 Comments

  1. Unknown User (marcori)

    Great (smile)

    I did the same thing, but i could not really test it.
    In fact your zip file doesn't works.

    When i try to open it, i've got this error:

    Either this file is not
      a zipfile, or it constitutes one disk of a multi-part archive.  In the
      latter case the central directory and zipfile comment will be found on
      the last disk(s) of this archive.

  2. Unknown User (elamigo)

    For those who cannot open this file, you need 7-zip to open it. It is readily available for download in linux (debian) by typing:

     sudo apt-get install p7zip

     For windows users, you can download 7zip from http://www.7-zip.org/

     Good luck

  3. Unknown User (adhwa)

    Ayte... 

     Can someone help me on how to use OFBIZ in netbean?

    Currently, I am using the latest version of Netbean 6, and also the latest trunk for OFBIZ. Can someone help me how to insert OFBIZ in netbean 6.7 step-by-step from the beginning and how to configure ofbiz in netbeans... any references also might could help... thank you.

     Sorry, but i am very new in OFBiz.. so really appreciate for the help...

  4. Unknown User (chanda15@gmail.com)

    Hi,

    As the above steps mentioned, i followed and setup successfully in Netbeans ide 6.7 version.

    But, in every java file, it contains error of type : "Error in parsing Java file"

    Could any one help me on this issue.

    Thanks,

    Naveen


    1. Unknown User (elamigo)

      Hi naveen,

      I don't know if you have already solved the problem, if not, can you provide a little bit of more detail on the error you mentioned. At least provide a screenshot of the error. As you know, working with OFBIZ code in Netbeans is not perfect, you may see some warnings of missing class libraries here and there in the IDE. But as long as you can compile and run the code, the IDE warnings can be ignored.

  5. Another way to get started is to use the option import project then Eclipse project...

    Select Import project ignoring Project Dependencies and browse to select the ofbiz folder. Create a folder for the netbean project for the Destination folder.

    After few seconds, the project will be imported.

    I had to adjust few things into the project properties sources:

    • Includes/Excludes : removed the org/ofbiz from the exclude !
    • Test sources: removed from test and added to source
    1. Patrick,

      One thing you could do is to clean the page: simply replace the information by the one you provided. I could then take care of removing the useless comments. Sorry to have been so long to understand your point (as an Eclipse user I was Eclipse biased) and thanks for sharing.