Step 3 : ARM 4.0 Java Hello World example

Description

To operate with any ARM interface we need an initial object which creates all other ARM related objects. Therefore we need an instance of the ArmTransactionFactory interface. The getTranFactory() static method tries to create such an object. There are several things to consider by getting such an instance. For simplicity we assume this method works fine here. If no such object could be instantiated we just exit our example.

Code

01: import org.opengroup.arm40.transaction.*;
02: 
03: public class HelloWorld  {
04: 
05:     public static void main(String argv[]) throws Exception {
06: 
07:         ArmTransactionFactory tranFactory;
08:         if ((tranFactory = getTranFactory())==null) {
09:             System.exit(-1);
10:         }
11:         System.out.println("Hello world!");
12:         System.exit(0);
13:     }
14: }