Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » How to run Epsilon from Java(I can't run Epsilon from Java)
How to run Epsilon from Java [message #1853039] Wed, 15 June 2022 15:08 Go to next message
Jose Alejandro Concepcion Alvarez is currently offline Jose Alejandro Concepcion AlvarezFriend
Messages: 11
Registered: June 2022
Junior Member
I have an Epsilon project that works fine, I have two EOL scripts to perform my calculations, one to populate my models and one for code generation.
I would like to create a Java class that loads the necessary dependencies from Epsilon Packages to load the models, run the EOL script, and the code generation part.
I have taken this example from the repositories but eclipse con resolve this "import org.eclipse.epsilon.emc.emf.EmfModel",
this is my first project in this domain and i don't know how to solve it.
What I have to do for from the JavaClass run Epsilon scripts.

This was the link I followed:
https://git.eclipse.org/c/epsilon/org.eclipse.epsilon.git/tree/examples/org.eclipse.epsilon.examples.standalone/src/org/eclipse/epsilon/examples/standalone/EpsilonStandaloneExample.java

index.php/fa/42195/0/
Re: How to run Epsilon from Java [message #1853040 is a reply to message #1853039] Wed, 15 June 2022 15:15 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

You need to use the entire project as your starting point, not just the .java file. The project is Maven-based, and it automatically fetches the Epsilon JAR files from Maven Central.

Please see this article in the Epsilon website:

https://www.eclipse.org/epsilon/doc/articles/run-epsilon-from-java/
Re: How to run Epsilon from Java [message #1853043 is a reply to message #1853040] Wed, 15 June 2022 15:38 Go to previous messageGo to next message
Jose Alejandro Concepcion Alvarez is currently offline Jose Alejandro Concepcion AlvarezFriend
Messages: 11
Registered: June 2022
Junior Member
I have read the article, but I still have doubts about the workflow to follow.
The Java class from what context I create it, the example is not completely clear to me. I simply create a Java class and
add this code and my eclipse does not recognize it.
Could you clarify me how I should proceed to create a Java class that is integrated with the Project dependencies?
Re: How to run Epsilon from Java [message #1853045 is a reply to message #1853043] Wed, 15 June 2022 16:10 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

You need to add the relevant Epsilon JARs from Maven Central to your project. The example project includes a pom.xml file to do that using Apache Maven:

https://git.eclipse.org/c/epsilon/org.eclipse.epsilon.git/tree/examples/org.eclipse.epsilon.examples.standalone/pom.xml

I suggest that you check these introductory resources to Maven, and to using Maven from Eclipse:

https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
https://www.vogella.com/tutorials/EclipseMaven/article.html
Previous Topic:How run EOL script from a Java Class
Next Topic:all() / allInstances() working - allOfType() / allOfKind() not found
Goto Forum:
  


Current Time: Thu Apr 25 07:32:16 GMT 2024

Powered by FUDForum. Page generated in 0.03789 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top