You can configure the JDK version in .travis.yml file looks like below:

```
language: java

jdk:
- openjdk8
```

Lei Zhang

> 在 2019年10月8日,下午7:58,bismy <bi...@qq.com> 写道:
> 
> Hi,
> 
> 
> Travis CI updated JDK from 8 to 11, and java-chassis got some compile errors. 
> Check
> 
> 
> &nbsp; 
> &nbsp;https://travis-ci.org/apache/servicecomb-java-chassis/jobs/595065203
> 
> 
> for details. And the error explaination is :
> 
> 
> https://blogs.oracle.com/darcy/new-javac-warning-for-setting-an-older-source-without-bootclasspath
> 
> 
> 
> 
> I have some ways to solve this problem:
> 
> 
> 1. add&nbsp;-Xlint:-options to ignore the warnings. And maybe cause some 
> unexpected error when running the compiled jar files using JDK 8.&nbsp;
> 2. still using JDK 11 and add rt.jar in project source, and 
> add&nbsp;&nbsp;-bootclasspath&nbsp;"$SRC_HOME/jre/lib/rt.jar"&nbsp;option. 
> This will add rt.jar for each project and may not be valid to do so
> 3. Force travis CI using JDK 8. But I can find any way to do this.&nbsp;
> 
> 
> Any ideas or help ?

Reply via email to