Setup Development Environment
Your hardware should ideally meet the following specifications:
- Unix or Windows PC
- Processor >1.5 GHz
- RAM >1 GB
- Harddrive >100 GB
- Internet connection >5 MBit
The following software need to be installed:
- Java SE 6 SDK
- Choose an Integrated Development Environment (IDE)
- BEAM 4.6
In this tutorial the BEAM 4.6 installation directory is named %BEAM4_HOME% in the following. On Windows operating systems this would evaluates to, e.g. C:/Program Files/beam-4.6.1.
For the BEAM development you will also need the following files from the BEAM home page:
- Download BEAM API documentation beam-4.6-apidoc.zip from BEAM download page and copy file into %BEAM4_HOME%.
- Download BEAM source code beam-4.6-sources.zip from BEAM download page and copy file into %BEAM4_HOME%.
- Download the AATSR TOA L1B sample product from BEAM sample products page and unpack it somewhere.
Start BEAM/VISAT and open the AATSR TOA product and have a look at its contents.
Configure IDE
Configuration
The default memory settings for IDEA are a bit to low. So you should adjust them before starting IDEA.
Go to the bin folder in the IDEA installation directory and open the file idea.exe.vmoptions in an editor. Ensure the following settings:
-Xms128m -Xmx768m -XX:MaxPermSize=250m -ea
Set Workspace
Start Eclipse. When Eclipse is started the first time, it will prompt for creating a default workspace. Use e.g. beam-programming-workshop.
Configure Preferences
The following settings are used for BEAM coding, you actually don't need to follow them.
- Start Eclipse
- In the Windows menu, click Preferences...
- Select Java/Code Style/Formatter
- Click New..., enter Profile name: BEAM, click OK
- In the tab Indention of the new profile change Tab policy: to Spaces only
- In the tab New Lines check both settings in group Array initializers
- In the tab Line Wrapping select Function Calls/Arguments, set Indentation Policy to Indent on Column
- Click OK to close profile editor
- Select Java/Editor/Typing
- In group Automatically insert at right position, check Semicolons and Braces
- Click OK to close the preferences dialog
Install StartExplorer Eclipse Plug-in (Windows only)
The StartExplorer Eclipse Plug-in provide very useful additional IDE tools but installation is not not required for this tutorial. The extra functionality comprises tools such as:
- Show resource(s) in Windows Explorer
- Start this (these) file(s) with system editor
- Start cmd.exe here
- Copy resource path to clipboard
In order to install the Eclipse Platform Extensions perform the following steps.
- In the Eclipse main menu, click Help/Install New Software...
- Click Add...
- Set Name to StartExplorer
- Set URL to http://startexplorer.sourceforge.net/update/
- Click "Ok"
- In the panel select the StartExplorer, click Next >
- Click Finish
- Note for Windows Vista Users: Vista will, for security reasons, by default not allow Eclipse to add files, e.g. plugins, to a Eclipse installation below "Program Files" and all writes will get silently redirected to a virtual store. One work around for this is to run Eclipse in administrator mode.
- After the plugin has been installed, restart Eclipse