Example: Call Java code from Epsilon

var frame = new Native("javax.swing.JFrame");
frame.setBounds(100,100,200,200);
frame.title = "Opened from EOL";
frame.visible = true;

Check out the code from the SVN:

  • go to the SVN repository
  • navigate to trunk/examples
  • check out the org.eclipse.epsilon.examples.calljava project

Once you have checked out/imported the code, to run the example you need to go through the following steps:

  1. register any .ecore metamodels in the org.eclipse.epsilon.examples.calljava project
  2. right click the .launch file in the org.eclipse.epsilon.examples.calljava project
  3. select Run as... and click the first item in the menu that pops up

What's this?

In this example, we create a JFrame from EOL. The aim of this example is to show how to call Java code from within Epsilon languages.

What are .emf files?

.emf files are Ecore metamodels expressed using the Emfatic textual syntax.

Even more examples...

More examples are available in the examples folder of the SVN repository.