title: Run a Flink job on a remote cluster without providing a .jar
body: <p>I have the following problem: I want to create a Flink job in IntelliJ on a local machine and run it on a remote cluster which is located in a VM. I used the <strong>createRemoteEnvironment</strong> function but anonymous classes as well as lambda expressions require jar files (if I didn't miss anything). Is there a (or another) way to run a Flink job on remote cluster without providing jar files? The following code is a simple Flink job I wanted to run on the remote cluster (without a jar).</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
      StreamExecutionEnvironment env = StreamExecutionEnvironment.createRemoteEnvironment("192.168.56.101", 6123);
  
      DataStream&lt;Tuple2&lt;String, Integer&gt;&gt; dataStream = env
          .socketTextStream("192.168.56.102", 8080)
          .flatMap((String sentence, Collector&lt;Tuple2&lt;String, Integer&gt;&gt; out) -&gt;
              {
                  for (String word: sentence.split(" ")) {
                      out.collect(new Tuple2&lt;String, Integer&gt;(word, 1));
                  }
              });
  
  
      // Alternative approach with an anonymous class
      /*DataStream&lt;Tuple2&lt;String, Integer&gt;&gt; dataStream = env
          .socketTextStream("localhost", 8080)
          .flatMap(new FlatMapFunction&lt;String, Tuple2&lt;String, Integer&gt;&gt;() {
          @Override
          public void flatMap(String sentence, Collector&lt;Tuple2&lt;String, Integer&gt;&gt; out) 
          throws Exception {
              for (String word: sentence.split(" ")) {
                  out.collect(new Tuple2&lt;String, Integer&gt;(word, 1));
              }
          }
      });*/
  
      dataStream.print();
  
      env.execute("Window WordCount");
  }
  </code></pre>
  
  <p>Thanks for any help!</p>