kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kyle B <kbi...@gmail.com>
Subject Kafka Compile JDK8
Date Sun, 17 Apr 2016 23:41:45 GMT
Hello,

I'm trying to build Kafka 0.9.0.1 using JDK8, so that it generates JDK8
compatible class files. However, no matter what I try, it seems the class
files generated are for JDK6. I've tried setting sourceCompatibility
and targetCompatibility to 1.8 to no avail.

------------------------
$ pwd
kafka-0.9.0.1-src
$ javac -version
javac 1.8.0_77
$ diff build.gradle
90c90,91
<   sourceCompatibility = 1.7
---
>   sourceCompatibility = "1.8"
>   targetCompatibility = "1.8"
184a186,187
>     sourceCompatibility = "1.8"
>     targetCompatibility = "1.8"
254a258,259
>   sourceCompatibility = "1.8"
>   targetCompatibility = "1.8"
$ ./gradlew -PscalaVersion=2.11.7 clean releaseTarGz -x signArchives
...
$ file ./core/build/classes/main/kafka/common/TopicAndPartition.class
./core/build/classes/main/kafka/common/TopicAndPartition.class: compiled
Java class data, version 50.0 (Java 1.6)
------------------------

Is compiling Kafka to JDK8 compatible class files supported? Has anyone
done this successfully, and can tell me what I'm doing wrong?

Thanks much,

-Kyle

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message