Hi Theodore,

Thanks a lot for reporting this.
It is true that many people have encountered it also during the training 
sessions.

Cheers,
Kostas

> On Nov 16, 2016, at 2:49 PM, Theodore Vasiloudis 
> <theodoros.vasilou...@gmail.com> wrote:
> 
> Hello all,
> 
> I was preparing an exercise for some Master students and I went through 
> running the Java
> quickstart setup [1] again to verify everything works as expected.
> 
> I ran into a problem when running from within IDEA, we've encountered this in 
> the past during trainings.
> 
> While the quickstart guide indicates that you should be able to just run the 
> examples
> from the Maven archetype that was not the case for me, what I got instead was
> ClassNotFound exceptions because the default run configuration does not pull 
> in
> the dependencies as it should.
> 
> What I needed to do to get the examples to run from within the IDE was:
> 
> 1) In project structure, add a new module say "mainRunner"
> 2) In mainRunner's dependencies add the main module (say "quickstart") as a 
> module depency.
> 3) In mainRunner's dependencies add the rest of the project library 
> dependencies.
> 4) In the run configuration for the example change the "Use claspath of 
> module" to mainRunner from quickstart.
> 
> If this is a problem other people have ran into (as evidenced by [2] [3]) I 
> think we should either include the instructions in the docs, or if possible 
> change the Java quickstart archetype to include the extra module.
> The Scala quickstart has the mainRunner module already, and the appropriate 
> instructions
> on how to run from within IDEA are in the docs.
> 
> I saw there's a PR [4] for the quickstart already, we could include this 
> there.
> 
> 
> [1] 
> https://ci.apache.org/projects/flink/flink-docs-release-1.1/quickstart/java_api_quickstart.html
>  
> <https://ci.apache.org/projects/flink/flink-docs-release-1.1/quickstart/java_api_quickstart.html>
> [2] 
> https://stackoverflow.com/questions/40073413/apache-flink-wordcount-example-exception-in-thread-main-java-lang-noclassdef
>  
> <https://stackoverflow.com/questions/40073413/apache-flink-wordcount-example-exception-in-thread-main-java-lang-noclassdef>
> [3] 
> https://stackoverflow.com/questions/30571618/executing-sample-flink-program-in-local
>  
> <https://stackoverflow.com/questions/30571618/executing-sample-flink-program-in-local>
> [4] https://github.com/apache/flink/pull/2764 
> <https://github.com/apache/flink/pull/2764>

Reply via email to