How to call java from python using PY4J
I want to call java from python with Py4J library, from py4j.java_gateway import JavaGateway gateway = JavaGateway() # connect to the JVM gateway.jvm.java.lang.System.out.println('Hello World!') I've got the following error: "Py4JNetworkError: An error occurred while trying to connect to the Java server". It's seems that no JVM is running, how to fix that? package test.test; import py4j.GatewayServer; public class AdditionApplication { public int addition(int first, int second) { return first + second; } public static void main(String[] args) { AdditionApplication app = new AdditionApplication