Security Tutorial (Java/AnBx)

Security Programming, Protocol Verification and Code Generation
Paolo Modesti -

Eclipse Configuration

In order to run the programming parts of this tutorial under Eclipse you need to setup a Java project. We recommend to use "Eclipse for Java Developers".

An explanation on how to set up a Java project can be found here.

  1. Call your project "AnBxTutorial" (step 2).
  2. For this tutorial you need to add a reference to the AnBxJ library (step 8).
    Right click on the root folder of your project, select "Properties". Then select "Java Build Path" -> "Libraries"
    If a reference to AnBxJ.jar is not present, select "Add External JARs ..." and select the location of your AnBxJ.jar file.
  3. Be aware that source files must be added under the src folder. In the same folder you could expand also the keystore file.
  4. In order to run the client and the server you need to setup a "Run configuration" under "Java Applications"
    Select "Run" -> "Run configurations..."

    Create a new configuration. If your application is "Tutorial_01.java" set the following parameters:
    Main
    Project: "Tutorial_01 (server)"
    Main Class: "Tutorial_01"
    Arguments
    Program arguments: "server"
    Working directory: "${workspace_loc:AnBxTutorial}"\src

    Click on "Apply" and "Run"

    Repeat the same for the "client"

Remarks:

  1. The working directory must be set to "src" in order to allow the program to find the right path of the keystore folder (which is subfolder of src).
  2. The executable files (.class) are created in the folder bin

The configuration of the AnBx-IDE (eclipse plug in) is available here.