Installation Wiki

Installing OFBiz

From InstallationWiki

Jump to: navigation, search
Installing OFBiz
Official Page
Project Documentation
Download
Source Book
200px-1847194001.jpg
ISBN 978-1-847194-00-8
Publisher Packt Publishing
Author(s) Rupert Howell, Jonathon Wong

Contents

[edit] Downloading and Installing SVN

We begin by obtaining the required 'downloader software' which is TortoiseSVN. TortoiseSVN is not the only Subversion client. Since TortoiseSVN carries a performance overhead and can slow Windows Explorer, many people choose to use the SVN from the command line using the Command Line client available from the Subversion website. For those already used to working with Eclipse, the Java Development Environment, there is also a handy plug-in called Subclipse. Full details of all Third Party clients and the Subversion command live installer are available on the Subversion Tigris.org website: http://subversion.tigris.org.For the sake of the examples and tutorials, TortoiseSVN has been selected for its ease of use and simplicity.

[edit] Downloading TortoiseSVN

We will first need to download TortoiseSVN http://tortoisesvn.net/downloads. There should be two versions: one for 32-bit operating systems and the other for 64-bit ones. Most of us will need the 32-bit version. If your Windows operating sys3.em has the term "x64" in its name, you'll need the 64-bit version. Download the appropriate one for your Windows operating system. Follow the on-screen instructions to complete the installation process.


Create a folder where you want to store the OFBiz files. Let's call this the "OFBiz installation folder", hereafter referred to as ${OFBizInstallFolder}. Any folder will do because OFBiz does not need to be in any special place in your operating system in order to run. It is highly recommended, however, to store OFBiz in a location that has no spaces in its path, as this can sometimes cause strange errors. A good place could be C:\workspace\ofbiz4.0, since we are going to work with OFBiz 4.0 and eventually build an Eclipse workspace.

Go to the OFBiz installation folder using the Windows Explorer. Right-click on an empty area inside the Windows Explorer to bring up the "context menu".

Left-click SVN Checkout to bring up the Checkout dialog box. In the field URL of repository, enter http://svn.apache.org/repos/asf/ofbiz/branches/release4.0.

If the folder ofbiz4.0 does not exist, you will first be informed and asked if you wish to create it.

You should now see the files being checked out in the SVN information box. Once you complete the final message in the box will say Completed and give the revision number of the version that was checked out.

At the time of writing, the total size of the checkout was 25.69 MB. It should be noted that this includes all of the source code and libraries that OFBiz needs to run. Needless to say, the length of time it takes to check-out the code depends on the speed of the connection.

[edit] Our OFBiz Workspace-First Look

When the check-out process is completed, we will see our OFBiz SVN workspace.

Depending on your Windows Explorer settings, you may or may not see hidden folders and files. You may see grayed out (hidden).svn folder which contains the SVN control files, something we should not have to bother with.

As we proceed and begin to change files, you may see the green ticks change to:

This means the folder (or the contents of the folder rather) has changed locally since the last update (or initial checkout). For now we do not need to worry too much about the workings of SVN. Since we will not be committing the changes back into this SVN server, we can ignore these icons.

[edit] Installing and Downloading the Java Development Kit (JDK)

Before we can run OFBiz, we will need to compile it.

OFBiz is written largely in Java, and the framework is entirely in Java. Code written in Java needs to be pre-parsed and pre-compiled before it can be executed. To compile OFBiz, we will need the Java Development Kit (JDK) 5.0 [1]

Strictly speaking, OFBiz 4.0 only requires Java 1.4. However, since the current ("trunk" branch) OFBiz development uses Java 5, and the next OFBiz release will likely use Java 5, we should get used to Java 5 now. Note that full Java 5 syntax is not yet supported in BeanShell, a scripting language will be used throughout this book, so we will still be doing Java 4 syntax when writing in BeanShell.

[edit] Downloading JDK 5.0

On the JDK 5.0 download page, we should see at the top of the download items list the version for Windows Platform. We want the Windows Offline Installation, Multi-language download (at 51.42 megabytes).

The technical name for JDK 5.0 is really JDK 1.5, as can be seen from the filename jdk-1_5_0_13-windows-i586-p.exe. JDK 1.5 came in after JDK 1.4. JDK 1.5 was named JDK 5.0, possibly for marketing purposes. More details about the change of naming convention are at http://java.sun.com/j2se/1.5.0/docs/relnotes/version-5.0.html.

The version we're working with is for the operating system MS Windows 32-bit. If you're using a 64-bit operating system, you can try the version under Windows x64 Platform. The filename jdk-1_5_0_13-windows-amd64.exe suggests it may only be for an AMD 64-bit computer, but that binary should also be compatible with Intel 64-bit computers.

In case you encounter any problems with the download of the JDK 5.0,see the Sun Download and Installation Notes at http://java.sun.com/j2se/1.5.0/install.html.

[edit] Installing JDK 5.0

Double-click on jdk-1_5_0_13-windows-i586-p.exe to start the installer. In the installation setup screen, change the Install to value to C:\Java\jdk1.5.0_13\. By default, the Java Installer may suggest to install to C:\Program Files. Installing to the default location has been seen to cause errors, particularly in the RMI (Remote Method Invocation) code on startup. This is due to the white space between Program and Files. Leave the feature Development Tools selected, and leave all other features unselected. For our purposes here, we only need the JDK and the private JRE 5.0. Proceed to complete the installation process.

Once the installation of the JDK is complete, we need to check that the environment variable JAVA_HOME is set correctly. To do this, click Start Button | Control Panel | System and select the Advanced Tab

Towards the bottom of the dialog box, you should see the Environment Variables button. There are two things to check here, first ensure that there is a variable set up called JAVA_HOME, pointing to the location C:\Java\jdk1.5.0_13 and then ensure that there is an entry under the PATH variable pointing to C:\Java\jdk1.5.0_13\bin.Entries in the PATH must be separated by a semi colon(;). If in the unlikely event these don't exist, they must be added manually, preferably as System Variables.

[edit] Source

The source of this content is Chapter 1: Installing OFBiz of Apache OFBiz Development: The Beginner's Tutorial by Rupert Howell, Jonathon Wong (Packt Publishing, 2008).

Personal tools