How to create environment variable SONAR_RUNNER_HOME for sonar (eclipse ) in windows 7
Solution 1
Steps to set environment variables for SONAR_RUNNER_HOME
Open your environment variables window. Click new button in System variables section.
-
Set a variable name SONAR_RUNNER_HOME and its value should be the unzipped path of sonar-runner zip file.
Example:- variable name:- SONAR_RUNNER_HOME variable value:- C:\Program Files (x86)\sonar-runner
-
And then append sonar-runner's bin path %SONAR_RUNNER_HOME%\bin to the environment variables path.
Example:- variable name:- PATH variable value:- %SONAR_RUNNER_HOME%\bin;
Solution 2
You need to open your environment variables first. You do this by pressing "Winkey" + "Pause" at the same time -> click on "advanced system settings" on the left -> select "environment variables"
1.What needs to be added as a seperator, like ";" , "%" and where?
Under Windows ";" (semicolon) is used as seperator. You need to add it at the end of your variable, so you tell windows that another variable begins here. E.g. "C:/programs/myProgram; C:/programs/anotherProgram" (have a look at your "PATH" environment variable and you will understand what I mean.)
2. Which directory path of Sonar is to be assigned to the path? In short I need whole procedure for setting the SONAR_RUNNER_HOME in windows.
The following guide is the same as the offical one on this page Installing and Configuring SonarQube Runner:
Uncompress the downloaded file into the directory of your choice (e.g.: C:\Program Files\SonarRunner). I'll refer to it as in the next steps.
Update the global settings (database connection, server URL) by editing /conf/sonar-runner.properties. (have a look at the link given above)
Create a new SONAR_RUNNER_HOME environment variable set to
Add the /bin directory to your PATH / Path. (You can either add e.g."C:\Program Files\SonarRunner\bin;" or "%SONAR_RUNNER_HOME%\bin;"). Make sure you add an ";" (semicolon) behind your existing variables as an seperator.
You can check the basic installation by opening a new shell and executing the command "sonar-runner -h" (on Windows platform the command is "sonar-runner.bat -h") . For a example please have a look at the link above.
You could also have a look at: Analyzing with SonarQube Runner
Admin
Updated on September 19, 2020Comments
-
Admin almost 4 years
I am working on eclipse helios and windows 7.
I dont know 1.What needs to be added as a seperator, like ";" , "%" and where? 2. Which directory path of Sonar is to be assigned to the path?
In short I need whole procedure for setting the SONAR_RUNNER_HOME in windows.