title: How do I submit a job to a Flink cluster using Java code?
body: <p>I have already uploaded a fat jar containing my application code to the /lib folder of all nodes in my Flink cluster. I am trying to start the Flink job from a separate java application, but can't find a good way to do so.</p>
  
  <p>The closest thing to a solution that I have currently found is the Monitoring Rest API which has a <a href="https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/rest_api.html#jars-jarid-run" rel="nofollow noreferrer">run job API</a>. However, this only allows you to run jobs submitted via the job upload function.</p>
  
  <p>I have seen the <strong>ClusterClient.java</strong> in the flink-client module, but could not see any examples of how I might use this.</p>
  
  <p>Any examples of how someone has submitted jobs successfully through java code would be greatly appreciated! </p>