Async with Oxygene for Java?

I’am evaluating Oxygene for Java and tried to use the async keyword in this simple code:

begin async System.out.println('The magic happens here.'); end.

I get compilation error (E28) Unknown type “com.remobjects.oxygene.system.FutureHelper”.

Does that mean that the parallel keywords like async, await are only compilable for .NET, or did I miss some prerequisites?

Thank you.

Environment: Windows 8 Enterprise Eval 32bit, Cooper from installation with VS2012

OK, resolved myself.

There are several problems.

  1. The application must not be classless
  2. I had to manually add reference to com.remobjects.oxygene.rtl
  3. In the properties of this reference set Copy Local to True

Than this testing console application works and prints (as expected) the lines in reversed order.

namespace consoleapplication2;

interface

uses
java.util;

type
ConsoleApp = class
public
class method Main(args: array of String);
end;

implementation

class method ConsoleApp.Main(args: array of String);
begin
async System.out.println(‘Hello World Async!’);
System.out.println(‘Hello world sync.’);
System.in.read();
end;

end.