Dashboard > Mantra > ... > Documentation > Embedded Java code
  Mantra Log In | Sign Up   View a printable version of the current page.  
  Embedded Java code
Added by Terence Parr, last edited by Terence Parr on Nov 03, 2007  (view change)
Labels: 
(None)

Very easy to hook to java directly. Can also build a mantra compatible Java class easily.

java {
import java.io.*;
}
class A {
  int x = 1;
  java {
       File f = new File("foo");
  }
  foo(int a) {
    java { System.out.println("x="+x+", a="+a); };
    string b = java { new mstring("hi"); };
  }
}
Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.1 Build:#806 May 06, 2007) - Bug/feature request - Contact Administrators