Installing CodeQL for Eclipse standalone

Prerequisites

There are no prerequisites for the standalone version of CodeQL for Eclipse. A standalone installer is available for Windows, Linux, and macOS operating systems. This provides an easy way to install Eclipse with the CodeQL for Eclipse plugin, which you can use to analyze CodeQL databases (previously known as "snapshots") of open source and closed source projects.

For information about installing CodeQL for Eclipse into an existing installation of Eclipse see Installing the licensed CodeQL for Eclipse plugin.

Note

This plugin is suitable for analyzing databases downloaded from LGTM Enterprise or created using command-line tools of the same version. If you also want to analyze databases downloaded from LGTM.com, you need to install the new CodeQL extension for Visual Studio Code, see the Visual Studio Code marketplace. For more information on database compatibility, see Database compatibility.

Installing CodeQL for Eclipse standalone

To install CodeQL for Eclipse standalone
  1. Download the CodeQL for Eclipse bundle zip archive, either from your organization's system administrator, or directly from GitHub: https://github.com/Semmle/eclipse-codeql-binaries/releases.
  2. Extract the zip archive into a local directory.

On Linux and macOS, it's best to use the command-line unzip utility. If you use a GUI-based archive utility, such as the default unzipper in Finder and Safari on macOS, run the following commands after unzipping to ensure that Eclipse can be launched:

  • On Linux, run: chmod +x ql-for-eclipse/eclipse
  • On macOS, run the first two steps below to update the newly installed application so that you can launch Eclipse. If you want to open Eclipse by launching Eclipse.app directly in the user interface, you may also need to the final step.
    1. chmod +x ql-for-eclipse/Eclipse.app/Contents/MacOS/eclipse
    2. find ql-for-eclipse/Eclipse.app/Contents/Eclipse/java -exec chmod +x {} +
    3. xattr -cr ql-for-eclipse/Eclipse.app

Starting CodeQL for Eclipse

To start Eclipse
  1. Open the Eclipse application, stored in a ql-for-eclipse directory in the directory where you extracted the zip archive:
    • On Windows, run eclipse.exe
    • On Linux, run eclipse
    • On macOS, run Eclipse.app/Contents/MacOS/eclipse
  2. This opens a blank Eclipse workspace:

For more information about the workspace and about using Eclipse in general, see Eclipse tips for new users.

Related Topics Link IconRelated Topics