【Flink】org.apache.flink.client.program.ProgramInvocationException: Neither a ‘Main-Class‘, nor a ‘pr

org.apache.flink.client.program.ProgramInvocationException: Neither a 'Main-Class', nor a 'program-class' entry was found in the jar file.
        at org.apache.flink.client.program.PackagedProgram.getEntryPointClassNameFromJar(PackagedProgram.java:596)
        at org.apache.flink.client.program.PackagedProgram.(PackagedProgram.java:190)
        at org.apache.flink.client.program.PackagedProgram.(PackagedProgram.java:128)
        at org.apache.flink.client.cli.CliFrontend.buildProgram(CliFrontend.java:862)
        at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:204)
        at org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:1050)
        at org.apache.flink.client.cli.CliFrontend.lambda$main$11(CliFrontend.java:1126)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1692)
        at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
        at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1126)

打包方式错误

正确打包方式如下:

【Flink】org.apache.flink.client.program.ProgramInvocationException: Neither a ‘Main-Class‘, nor a ‘pr_第1张图片

【Flink】org.apache.flink.client.program.ProgramInvocationException: Neither a ‘Main-Class‘, nor a ‘pr_第2张图片 

【Flink】org.apache.flink.client.program.ProgramInvocationException: Neither a ‘Main-Class‘, nor a ‘pr_第3张图片

【Flink】org.apache.flink.client.program.ProgramInvocationException: Neither a ‘Main-Class‘, nor a ‘pr_第4张图片

【Flink】org.apache.flink.client.program.ProgramInvocationException: Neither a ‘Main-Class‘, nor a ‘pr_第5张图片

【Flink】org.apache.flink.client.program.ProgramInvocationException: Neither a ‘Main-Class‘, nor a ‘pr_第6张图片

然后就跑通了

【Flink】org.apache.flink.client.program.ProgramInvocationException: Neither a ‘Main-Class‘, nor a ‘pr_第7张图片

 

你可能感兴趣的:(错误解决,flink)