I want to run py4j on my Linux host.
My Java muscles are weak but I do know Python.
I started by installing Anaconda 5.0.1 which gives me Python 3.6.3
Next I installed the py4j package with a shell command:
conda install py4j
Then I installed Java sdk and put it here:
$HOME/jdk/
And I set env variables:
export JAVA_HOME=${HOME}/jdk
export PATH="${JAVA_HOME}/bin:${PATH}"
I use this shell command to see it:
java -version
It says:
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
Next I studied this page:
https://www.py4j.org/index.html
It asks me to start a server which relies on this Java file:
public class AdditionApplication {
public int addition(int first, int second) {
return first + second;
}
public static void main(String[] args) {
AdditionApplication app = new AdditionApplication();
// app is now the gateway.entry_point
GatewayServer server = new GatewayServer(app);
server.start();
}
}
Question: On Linux, which shell commands should I run to start the server listed in the above Java file?