Hi, you have to make sure that the Flink classes are contained in your class path. Either add the flink-dist jar from the binary distribution to your class path, or use maven to build the backend.jar as a fat jar.
Why are you generating a java class from your dataflows? Isn't it easier to just call the Flink APIs when parsing your flow description language? Robert On Mon, Sep 21, 2015 at 6:41 PM, Giacomo Licari <giacomo.lic...@gmail.com> wrote: > Hi guys, > > I'm developing a dataflow client whose backend, exported as jar, allows > users to convert dataflows to a Flink file .java with some code inside. The > generated file naturally calls some classes I have in jar file, like > MapFunction, DataSet. > > My question is: > How to compile the generated file and pack it into a jar file, so I can > execute it with Flink? > > I have tried several methods like: > > - javac -cp backend.jar:. GeneratedClass.java > - javac -cp ".:backend.jar" GeneratedClass.java > - javac -cp ".:./backend.jar" GeneratedClass.java > > with no success. > > I receive errors like: > GeneratedClass.java:2: error: package > org.apache.flink.api.common.functions does not exist GeneratedClass.java:3: > error: package org.apache.flink.api.java does not exist > > > Thanks a lot, > > Giacomo >