I think you simply missing a bunch of the Flink artifacts. Flink is broken into dozens of pieces, and you need to select from a large set of artifacts what you need to depend on.
Typically, there is one Flink artifact per "extension". I ended up with flink-core flink-core flink-connector-cassandra_2.11 flink-connector-kafka_2.11 flink-queryable-state-runtime_2.11 flink-streaming-java_2.11 flink-streaming-scala_2.11 With transitive dependencies enabled, meaning whatever Flink depends on is also included Cheers On Sat, Feb 24, 2018 at 3:22 AM, Esa Heikkinen <heikk...@student.tut.fi> wrote: > > Yes i have looked. For example, if i want to compile and run > StreamTableExample.scala from: > > https://github.com/apache/flink/blob/master/flink- > examples/flink-examples-table/src/main/scala/org/apache/ > flink/table/examples/scala/StreamTableExample.scala > > I have taken all examples (and also latest Flink at same time) to my Linux > from git. > > Where directory should i be in for compiling and running > StreamTableExample in command line ? flink-examples-table ? > > What is the command for compiling ? mvn clean install -Pbuild-jar ? > > What is the command running the StreamTableExample ? /<path to flink > bin>/flink run -c org.apache.flink.table.examples.scala.StreamTableExample > target/flink-examples-table_2.1-1.5-SNAPSHOT.jar ? > > This does not work because of error: java.lang.NoClassDefFoundError:... > > BR Esa > > Fabian Hueske kirjoitti 23.2.2018 klo 15:07: > > Have you had a look at the examples?  > They can be run out of the IDE. > > Fabian > >  https://github.com/apache/flink/tree/master/flink- > examples/flink-examples-streaming/src/main/scala/org/ > apache/flink/streaming/scala/examples > > 2018-02-23 13:30 GMT+01:00 Esa Heikkinen <esa.heikki...@student.tut.fi>: > >> I have lot of difficulties to deploy Flink. That is maybe because I am >> new with Flink and its (Java and Maven) development environment, but I >> would hear the opinions of others. I would like to use Scala. >> >> >> >> There are many examples, but often there are missing “imports” and >> settings in pom.xml. It seem to be very hard to job to find correct ones. >> Maybe use of IDE (IntelliJ IDEA) is almost mandatory and it helps to find >> “imports”, but it does not find all of them. >> >> >> >> Generally you have to do and study a lot of basic work before you get >> into the actual thing ? >> >> >> >> If there is a ready example (with source code) that is enough close to >> what you want, it is much easier to deploy. But if not, it can be a >> surprisingly difficult and time-consuming task. Because the >> documentation seem to be partially incomplete, it is often necessary to >> “google” and query the mailing list. >> >> >> >> Or have I misunderstand something or I can not use Flink correctly (yet) ? >> >> >> >> Features of Flink are so good that I would want to learn to use it. >> >> >> >> Best Regards >> >> Esa >> > > > -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java