user6883156
user6883156

Reputation:

GRPC can support by java 6

Looks like grpc Prerequisites is java 7 or higher.

I got exception when install grpc. java.lang.UnsupportedClassVersionError: com/google/protobuf/gradle/ProtobufPlugin : Unsupported major.minor version 51.0

I have java 6 running locally. Could be a way grpc running with java 6?

Upvotes: 0

Views: 559

Answers (1)

Eric Anderson
Eric Anderson

Reputation: 26454

Gradle no longer supports running under JDK 6. That said, gRPC is currently using an older version of Gradle that does work on JDK 6. But we also use a Protobuf plugin which doesn't work with JDK 6 (which is the error you see). Since we expect to upgrade to Gradle 3 soon, there is little point in fixing the compilation problem.

So while you must have JDK 7 to compile, the output from the compilation does support JRE 6. Look at the artifacts on Maven Central; they use the older bytecode version for compatibility.

Java 6 is very old and has problems with things like TLS. The major reason Java 6 is supported is to ease Android usage, but even Android has some features of Java 7. I'd highly recommend moving to a newer JRE.

Upvotes: 1

Related Questions