The following two tabs change content below.
Hi, I have written and developed this site to share my experience and ideas with other colleagues. I also started to prepare interview questions and answers for job seekers. I hope it will help you a lot.

What is Sonar/SonarQube?

SonarQube™ software (previously known as “Sonar”). Sonar is an open source Platform used by development teams to manage source code quality.

As such, Sonar provides code analyzers, reporting tools, defects hunting modules and TimeMachine as core functionality. But it also embarks a plugin mechanism enabling the community to extend the functionality (more than 35 plugins available), making Sonar the one-stop-shop for source code quality by addressing not only developers but also managers needs.

It is entirely written in java and supported for other 25+ languages such as Java, C/C++, C#, PHP, Flex, Groovy, JavaScript, Python, PL/SQL, COBOL, etc, it is also used for Android Development.

Sonar Software Installation:

1. Download the latest sonar from SonarQube Website
Note : if you are going to download SonarQube latest version which is greater then or equal to 5.6.1 then you should use JDK 8 or any upper version of java.

2. Unzip the downloaded file in any specific drive.

3. Set the path of sonar in environment variable till D:\sonar\sonarqube-5.6.1\sonarqube-5.6.1 like below:


4.  After setting the path variable you can start the Sonar web server using “StartSonar” command like below:


5. If StartSonar command runs successfully then means all are good. Sonar server runs on 9000 port and its is ready to use now.

6. You can open Sonar dashboard in browser : http://localhost:9000/  and below is screenshot of dashboard



Now configuring the Sonar Runner Analysing tool.

1. Download the sonar runner from this maven repo .

2. Extract/Unzip sonar runner into a specific drive and set the SONAR_RUNNER_HOME environment variable like:


and set “SONAR_RUNNER_HOME” to path variable and append /bin like :


After all these variable pls open the command prompt and run sonar-runner command. Just to check if we set the sonar runner successfully or not. after this command output will be like this.



Creating Project & Analysing Using Sonar

1. Create a new project or you can use your ongoing project also.

2. Under the root directory of project create a file with name “”

3. For setup purpose, just change the value of sonar.projectName to the project name you created in file like.


4. Now go to root directory of project and run “sonar-runner” command.


Now this command should run success without any issue.

5. All are set now you can view the Analysing report on sonar web server dashboard like:



In next post will share how to set the rules on sonar web server.

946 total views, 2 views today

One thought on “Sonar installation and configuration”

Leave a Reply

Your email address will not be published. Required fields are marked *