0

Now I'm working on the Sonar configuration, but encounter a problem when trying to access it by the address.

An error was throw:
Unsupported major.minor version 51.0. The way of resolving the problem was found-install java 7 and choose it will works. But the thing is I only can use java 1.6 to build my android project. If that, the java version is not compatible with Sonar's need. So if there's a way that can configure java 1.7 on Sonar and still keep the default java 1.7 version, that would be nice. Is there a way can achieve that?

My computer environment and software info are following:
1.System:Ubuntu 10.04.4 LTS x86_64
2.Sonarqube-4.5.4

Sysphus
  • 194
  • 1
  • 3
  • 11
  • How you are running your Sonar? – Arpit Aggarwal May 29 '15 at 10:43
  • Now Sonar 4.5.4 can be run with a specify jdk 1.7 which is not the default one, but I am facing a new problem:http://stackoverflow.com/questions/30639273/the-plugin-java-is-not-supported-with-java-1-6-0-45-from-sonarqube-4-5-4-with – Sysphus Jun 04 '15 at 08:53

1 Answers1

3

SonarQube requires Java 7 to run the server and the analysis.

This does not mean that you have to use Java 7 in your project: you can compile your source code with JDK 7 using Java 6 language level.

Mithfindel
  • 4,553
  • 1
  • 23
  • 32
  • Is there a way to specify a java version for sonar in a file, like configuration file? – Sysphus Jun 02 '15 at 08:58
  • 1
    See this other answer for the server side http://stackoverflow.com/questions/27562943/start-sonarqube-server-with-specific-jdk ; for the analysis/runner side, correctly setting your ``JAVA_HOME`` environment variable should be enough. – Mithfindel Jun 02 '15 at 09:43