I have created a sample maven project with Hello World
O/P
Hello.Java:-
public static void main(String[] args) {
System.out.println("Hello World");
}
DockerFile:-
FROM openwhisk/java8action
ADD target/app.jar app.jar
ENTRYPOINT ["java","-jar","app.jar"]
I used
docker build -t myAppDocker
docker run myAppDocker
Its working fine.
Now I am replacing
public static void main
With
public static JsonObject main(JsonObject args)
But now I am getting below error
Error: Main method not found in class com.sample.maven.docker.CustomDocker, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
What are the changes I need to do to work with it
Note: void main
is Java's Main-Method , same way JsonObject main
is openwhisk's Main-Method, I want to create it using OpenWhisk