mkdir babel-java-integration
cd babel-java-integration
mvn archetype:generate -DgroupId=com.example -DartifactId=babel-java-integration -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
<dependency>
<groupId>io.github.babeloff</groupId>
<artifactId>babel-runtime</artifactId>
<version>1.0.0</version>
</dependency>
import io.github.babeloff.runtime.Babel;
import io.github.babeloff.runtime.Invoker;
import io.github.babeloff.runtime.MethodInvocation;
import java.lang.reflect.Method;
public class App {
public static void main(String[] args) throws Exception {
MethodInvocation methodInvocation = MethodInvocation.newBuilder()
.build();
Object result = Invoker.invoke(methodInvocation);
System.out.println("Result: " + result);
}
}
mvn compile
mvn exec:java -Dexec.mainClass="com.example.App"