Start using the program with Eclipse
This page is a short guide for compiling and running the examples provided with
our framework for biofilm modeling. The program is presently available in the form
of compiled Java classes that may be used in new programs to implement other biofilm
models. However, knowledge of the Java programming language will be necessary, if you
wish to use these libraries.
If you have knowledge of other programming languages (such as C++) and wish to learn Java,
there is plenty of material freely available on the internet (see our suggested links at
the end of this page).
No Java knowledge is required for now to follow the steps in this guide.
In order to begin creating biofilm models you will need the following:
- Version 1.4.2 or higher of the Java Software Development Kit (J2SE 1.4.2 SDK), which may be downloaded from the Sun Java website. Download and install the SDK.
- Eclipse, a IDE (integrated development environment) for Java, available from www.eclipse.org. Download and install eclipse (version 3 or greater recommended).
- The software package for the biofilm modeling framework available here. Unzip the package into a directory of your choice (for example 'c:\framework' or '/home/$yourlogin$/framework').
Both the Java SDK and Eclipse are available for most popular platforms, including
Microsoft Windows, Mac OS X and Linux.
The remaining instructions will assume that you installed the Java SDK and eclipse correctly in your computer. Please refer to the respective websites for assistance in installing the Java SDK or Eclipse.
Preparing the program
Create a directory in your computer to place the program. For example 'c:\framework' in the case you are using windows or '/home/$yourlogin$/framework' if you are using linux. Copy the framework.zip file to this directory and unzip the contents. Do this in a way that the original framework.zip file remains in the directory. The file listing for the directory should be
Opening the program in eclipse
To create a new eclipse project with the biofilm modelling framework follow these steps:
- Start eclipse
- Create a new project by selecting File>new>Project
- In the "New Project" window, select "Java Project" and click "next"
- Write "framework" or other name of your choice in the "Project name" text field
- In the "Location field" choose "Create project at external location" and browse for your directory (in our example 'c:\framework')
- In the "Java settings" window select the "Libraries" binder and click "Add external jar". A browsing window will open. Select the file "framework.zip", which in our example is in the directory 'c:\framework'
- Click "Finish"
The javadoc documentation is located in the 'doc' subdirectory, in our example 'c:\framework\doc'. Use your web browser to view the documentation.
Running an application using Eclipse
The programs created or edited in Eclipse may be run directly from Eclipse using the 'run' command. From the package explorer, right-click on a class that has a 'main' method and select run>Java application. Try this for the "Monospecies2DGUI" application in the nl.tudelft.bt.model.examples.monospecies2D package.
Eclipse possesses many other features to assist in Java programming, including debugging. Please refer to the Eclipse documentation.
Included in the package is a distribution of the JfreeChart Java class library, used for plotting of state variables in realtime in the course of the simulations. JFreeChart is available for free at www.jfree.org.
The framework also has functions for output of biofilm structure representations using POVRAY. The POVRAY program is available for download at www.povray.org.
|Sun java tutorial||Start learning Java programming|
|Thinking in Java||Learn object oriented programming in Java in this book by Bruce Eckel, available for free download|