Swati
Swati

Reputation: 61

Sonnar runner error: 'sonar-runner' is not recognized as an internal or external command, operable program or batch file

I have just installed sonnar runner on windows 7 using guidelines from sonarqube.com

I have installed sonnarqube4.5 and sonar-runner on C drive but my project is in xampp/htdocs in D drive.

Now when I am trying to start sonnar runner using command line, I get following error:

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>cd..

C:\Users>cd..

C:>cd WIndows

C:\Windows>d:

D:>cd xampp

D:\xampp>cd htdocs

D:\xampp\htdocs>sonar-runner -e 'sonar-runner' is not recognized as an internal or external command, operable program or batch file.

Is this because I have project and sonnarqube on different drives? Please help.

Upvotes: 5

Views: 32835

Answers (2)

Mohamed MS
Mohamed MS

Reputation: 91

Go to this link https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/

download sonarscanner depends on your os,

then unzip it

C:\sonar-scanner-4.6.2.2472-windows\bin\sonar-scanner.bat

add the path to environment variable

Upvotes: 2

Nicolas B.
Nicolas B.

Reputation: 7331

It's because the sonar-runner executable is not in your current directory and Windows do not know where to find it. You need to add the directory containing sonar-runner to your PATH environment variable (see this thread for a similar case).

Note: SonarQube 4.5 is ancient, you should use the latest 5.6 LTS instead.

Upvotes: 4

Related Questions