As a desktop analysis user, once you've downloaded the installation package from the server, you must run the installer. On Windows and Mac, an installation wizard is provided to guide you through the installation process.
Before you begin
- When installing the Android Studio or IntelliJ IDEA plug-ins, you need to specify the path to the directory where Android Studio or IntelliJ IDEA are installed. The installation wizard may detect the path, but if not, change to the appropriate directory, for example, C:\Program Files\Android\Android Studio.
- You can override the default settings for the Klocwork Servers during installation. The defaults for the License Server are localhost and 27000. The default port for the Klocwork Server is 8080.
-
On Windows: Avoid installing the package in the Program Files directory on Windows. Windows User Access Control (UAC) restricts writing to the Program Files directory.
- Klocwork Servers configuration screen: Specify the Klocwork Server information provided by your Klocwork administrator. Select Use secure server connection (HTTPS) if a secure Klocwork Server connection has been configured.
- Make sure that you have the appropriate administrator access before installing the desktop plugin.
- On Unix:
- To control permissions when you are installing Klocwork, change the value of umask.
- To change the permissions on an existing installation, use chmod.
- Install Klocwork software as a non-root user.
-
Linux only: There are separate installation packages for 32-bit and 64-bit Java. Make sure you select the one that matches your operating system. There is no separate plug-in for Android Studio on Linux: use the IntelliJ IDEA installation package to integrate with Android Studio.
On Windows and Mac
For each of the plug-ins on Windows and Mac, simply download the package and run the installation wizard. The installation wizard will guide you through the rest of the process.
For Android Studio on Mac and on the 32-bit version of Windows, use the IntelliJ IDEA installation package. For Android Studio on the 64-bit version of Windows, use the Android Studio installation package. Note that you need to install the Android Studio plug-in into the same directory as Android Studio, for example C:\Program Files (x86)\Android\Android Studio.
On Mac
-
JVM version: On Mac OS, Klocwork uses the Java Virtual Machine provided by your system. Klocwork requires Java 7 or Java 8.
- Files are installed in the following location:/Library/Frameworks/
- Access command-line tools using the symbolic links in /usr/local/kw/.
On Unix
You can install the packages using the following command:
kw-<plug-in>-installer.sh [options] <install_directory>
Where
- <plug-in> is the name of the plug-in you want to install. For example, 'cmd' or 'idea'.
- [options] are any command line options you may want to specify. In most cases, just specify '-a' here to indicate that you agree to the terms of the Klocwork license. Use --h to get help on what available command line options exist.
- <install_directory> specifies the directory where the Klocwork plug-in will be installed
Add the bin directory to your PATH
We recommend adding the <command_line_tools_install>/bin directory to your PATH environment variable. Procedures in the documentation assume that you have added the bin directory to your PATH.
Command-line options for the desktop analysis plugin package on Unix
Name |
Short name |
Description |
--agree |
-a |
agree to license terms and do not display license agreement |
--force |
-f |
install without integrity checks |
--help |
-h |
display this help and exit |
--klocwork-server <host>[:<port>] |
|
specify the Klocwork Server host name and port number. Default: localhost:8080. |
--license-server <host>[:<port>] |
|
specify the License Server host name and port number. Default: localhost:27000 |
--version |
-v |
display the version of Klocwork software and exit |
--debug |
|
print the debug information |
kw-cmd-installer.linux64.sh -a /home/jlee/klocwork
where
- -a means that you agree to the terms of the Klocwork license
- /home/jlee/klocwork specifies where Klocwork will be installed
Example: Installing Klocwork Desktop Plug-in for IntelliJ IDEA on Linux
kw-idea-installer.linux.sh -a --klocwork-server server1:8084 "/home/jlee/idea-IC"
where
-
-a means that you agree to the terms of the Klocwork license
-
--klocwork-server specifies the name and port of the Klocwork server (this argument is optional)
-
"/home/jlee/idea-IC" is the path to the folder where IntelliJ IDEA is installed