Setup of Best-Practice development environment

This guideline provides information to setup the best practice development environment (please find the examples in the Download section.

Installation Instructions

Please follow all the instructions to assure the functionality of the development environment.

Java 6 Setup

The best practice examples use the Java 6 technology. To compile and run them, you need to have JDK 1.6 installed (JRE is not sufficient).

Download and install JDK

Please download the latest version of the JDK at When downloading the JDK you might also consider downloading the API documentation for offline use.

System settings

After installing the JDK please make sure to set the JAVA_HOME environment variable to point to your java directory.

Example (for Windows users) Press WinKey + Pause, go to the Advanced Tab (Erweitert), click on Environment variables (Umgebungsvariablen), click 'New' at user variables (Benutzervariablen) and define a new entry as follows:


Value: path/to/your/JDK-installation (e.g: H:\Programme\Java\jdk1.6.0_17 - Note: not the bin-directory)

Go to your console/shell and use the following command (anywhere):

java -version

Output should look something like this (depends on the version you installed):

java version "1.6.0_17"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0_17-b04)
Java HotSport(TM) Server VM (build 1.6.0_17-b04, mixed mode)

Maven 2 installation

Maven 2 is used to organize, build and deploy this application.

Maven Download & Installation

Please download the latest version at Maven Project site. Installation instructions are here.

Run mvn --version (in your console) to verify that it is installed correctly. Output should look something like this (depends on the version you installed):

Maven version: 2.2.1 
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_17
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.3" arch: "x86_64" Family: "mac"

BPSE Examples download & installation

Download the examples from Download section and unpack the archive to a folder of your choice.

After extracting the archive, you find the following folder structure

+- bpse
|`-- designpatterns 
|       `-- subfolders
|`-- basic 
|       `-- subfolders
|`-- documentation
|       `-- subfolders
`- pom.xml

(detailed information can be found at The sample apps section)

You then have to use Maven to download all required dependencies (used libraries in project; for more information see Maven technology page). Note: All mvn commands are executed in your console.

Execute mvn compile in the basic folder to automatically download all project dependencies to you local maven repository and compile the sources.

Basic Example Dependencies

Optionally Execute mvn compile in the designpatterns folder

Optionally build the Documentation locally (this site): Execute mvn site in the documentation folder

BPSE-Basic Installation

We just extracted the archive to a desired folder. Now we want to use the basic example in Eclipse.


  1. go to the basic folder and execute mvn compile or mvn install if you haven't done this already (download all dependencies for the project and compile)
  2. execute mvn eclipse:eclipse. This will create Eclipse project files (.project, .classpath, ...)
  3. Open Eclipse and goto File - Import, select Existing Projects into Workspace, select the directory where you executed the mvn eclipse:eclipse command before. Finish will create your project.

    Now everything is ready to play around with the basic example (Integration of the designpatterns example is very similar).

    The libraries used in the project should be available under Referenced Libraries in the Package Explorer of Eclipse - the mvn eclipse:eclipse command should already have added all dependencies to the classpath. These dependecies should all point to a classpath variable configured in Eclipse - "M2_REPO". You can optionally install a Maven plugin for Eclipse, but if you would like to configure this variable manually, you can go to Window - Preferences, select Java - Build Path - Classpath Variables and configure M2_REPO from there.