Install GroupDocs.Comparison for Node.js via Java

Prerequisites

  • Node.js: 20 LTS or later
  • Java: JRE/JDK 8+ (recommended 17 LTS)
  • Build tools if needed by your environment (node-gyp toolchain)

See full details on the System Requirements page.

Install from npm

All Java-bridged packages are hosted on npm. Install the library into your project using your preferred package manager:

# npm
npm install @groupdocs/groupdocs.comparison

# yarn
yarn add @groupdocs/groupdocs.comparison

# pnpm
pnpm add @groupdocs/groupdocs.comparison

Set up Java (JAVA_HOME)

Ensure your Java installation is available on PATH and JAVA_HOME is set.

Windows (PowerShell):

$env:JAVA_HOME="C:\Program Files\Java\jdk-17"
$env:Path="$env:JAVA_HOME\bin;$env:Path"

Linux/macOS (Bash):

export JAVA_HOME=/usr/lib/jvm/java-17
export PATH="$JAVA_HOME/bin:$PATH"

See the System Requirements page for more details.

Verify installation

Create a small script (e.g., check.js) and run it with Node.js:

try {
  const comparison = require('@groupdocs/groupdocs.comparison');
  console.log('GroupDocs.Comparison loaded:', typeof comparison === 'object');
  console.log('Java bridge initialized successfully.');
} catch (e) {
  console.error('Failed to load GroupDocs.Comparison:', e);
  process.exit(1);
}

And than run the script to verify the installation:

node check.js

Download from GroupDocs.Releases (offline)

You can download a package archive from GroupDocs.Releases and add it to your app. After downloading the .tar file, install it locally:

npm install ./groupdocs-groupdocs.comparison-<version>.tar

Alternatively, configure npm to use your corporate registry or proxy, then install using the standard command.

Troubleshooting installation

  • node-gyp toolchain not found: install the required build tools for your OS (see System Requirements).
  • Java not detected: set JAVA_HOME and add <JAVA_HOME>/bin to PATH.
  • Corporate proxy: configure npm proxy settings before running install.
  • Permission errors: ensure you have write access to the project directory and cache folders.
Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.