You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Ben Yan <ya...@gmail.com> on 2019/09/11 04:06:56 UTC
error: Static methods in interface require -target:jvm-1.8 using
scala 2.11
The following is the environment I use:
1. flink.version: 1.9.0
2. java version "1.8.0_212"
3. scala version: 2.11.12
When I wrote the following code in the scala programming language, I found
the following error:
// set up the batch execution environment
val bbSettings =
EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build()
val bbTableEnv = TableEnvironment.create(bbSettings)
error: Static methods in interface require -target:jvm-1.8
[ERROR] val bbTableEnv = TableEnvironment.create(bbSettings)
But when I use the java programming language or the version of scala
in 2.12, there is no problem.
If I use the version of scala2.11, is there any way to solve this
problem? thanks
Best,
Ben
Re: error: Static methods in interface require -target:jvm-1.8 using
scala 2.11
Posted by Ben Yan <ya...@gmail.com>.
thanks a lot!It works.
Jeff Zhang <zj...@gmail.com> 于2019年9月11日周三 下午12:58写道:
> Add this to your scala-maven-plugin
>
> <configuration>
> <args>
>
> <arg>-target:jvm-1.8</arg>
>
> </args>
>
> </configuration>
>
>
>
> Ben Yan <ya...@gmail.com> 于2019年9月11日周三 下午12:07写道:
>
>> The following is the environment I use:
>> 1. flink.version: 1.9.0
>> 2. java version "1.8.0_212"
>> 3. scala version: 2.11.12
>>
>> When I wrote the following code in the scala programming language, I
>> found the following error:
>>
>> // set up the batch execution environment
>> val bbSettings = EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build()
>> val bbTableEnv = TableEnvironment.create(bbSettings)
>>
>> error: Static methods in interface require -target:jvm-1.8
>> [ERROR] val bbTableEnv = TableEnvironment.create(bbSettings)
>>
>> But when I use the java programming language or the version of scala in 2.12, there is no problem.
>>
>> If I use the version of scala2.11, is there any way to solve this problem? thanks
>>
>>
>> Best,
>>
>> Ben
>>
>>
>
> --
> Best Regards
>
> Jeff Zhang
>
Re: error: Static methods in interface require -target:jvm-1.8 using
scala 2.11
Posted by Jeff Zhang <zj...@gmail.com>.
Add this to your scala-maven-plugin
<configuration>
<args>
<arg>-target:jvm-1.8</arg>
</args>
</configuration>
Ben Yan <ya...@gmail.com> 于2019年9月11日周三 下午12:07写道:
> The following is the environment I use:
> 1. flink.version: 1.9.0
> 2. java version "1.8.0_212"
> 3. scala version: 2.11.12
>
> When I wrote the following code in the scala programming language, I found
> the following error:
>
> // set up the batch execution environment
> val bbSettings = EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build()
> val bbTableEnv = TableEnvironment.create(bbSettings)
>
> error: Static methods in interface require -target:jvm-1.8
> [ERROR] val bbTableEnv = TableEnvironment.create(bbSettings)
>
> But when I use the java programming language or the version of scala in 2.12, there is no problem.
>
> If I use the version of scala2.11, is there any way to solve this problem? thanks
>
>
> Best,
>
> Ben
>
>
--
Best Regards
Jeff Zhang