Skip to main content
You must correctly configure the JAVA_HOME environment variable to locate the installed JDK (Java Development Kit) on your system and to enable Java applications and tools. This section shows how to set the JAVA_HOME environment variable and update the system PATH variable on both Linux and Windows.
To ensure proper compatibility between Java SunPKCS11 and the Futurex PKCS #11 module, use Oracle Java instead of OpenJDK. Futurex supports Oracle Java 11, 17, and 21.
Choose one of the following operating systems and perform the instructions:

Linux

Perform the following steps to configure the JAVA_HOME variable in Linux:
1
Determine the installation path of Oracle JavaFind the path for the Oracle Java installation, such as /usr/lib/jvm/. Use the following command to list the installed JDKs:
Shell
For example, if you installed Oracle Java 11, the path is likely: /usr/lib/jvm/jdk-11-oracle-x64.
2
Edit the profile fileOpen a terminal and use a text editor to edit the /etc/profile file, which the system uses when users log in. You might need superuser privileges to edit this file.
Shell
3
Add the JAVA_HOME environment variable and update PATHAdd the following lines to the end of the /etc/profile file, replacing the path with the actual path to your Oracle Java installation:
None
4
Apply the changesAfter saving the file, apply the changes by sourcing the profile file:
Shell
5
Verify the configurationTo ensure that the JAVA_HOME variable is set correctly and the PATH is updated, you can check their values with the following commands:
Shell
You should see the path you set for JAVA\HOME and ensure $JAVAHOME/bin is part of the PATH.

Windows

Perform the following steps to configure the JAVA_HOME variable in Windows:
1
Determine the installation path of Oracle JavaEnsure Oracle Java is installed on your system. Note the installation path, typically something like C:\Program Files\Java\jdk-11.
2
Open System PropertiesSelect the Win + Pause/Break keys to open the System Properties window, or right-click This PC(or My Computer) and select Properties.Select Advanced system settings on the left sidebar.
3
Open Environment VariablesIn the System Properties window, select [ Environment Variables ] near the bottom of the window.
4
Create a new system variableIn the Environment Variables window, in the System variables section, select [ New ].In the New System Variable dialog box, enter the following:
  • Variable name: JAVA_HOME
  • Variable value: The path to your JDK installation (such as C:\Program Files\Java\jdk-11)
5
Update the PATH variableIn the System variables section, find and select the Path variable, then seelct [ Edit ].In the Edit Environment Variable dialog, select [ New ] and add %JAVA_HOME%\bin to the list. This enables the system to find the Java executables.
6
Create an additional system variable
  • Variable name: FXPKCS11_CFG
  • Variable value: The path to your FXPKCS11 configuration file (such as C:\Program Files\Futurex\fxpkcs11\fxpkcs11.cfg)
7
Apply changesSelect [ OK ] on each dialog box to apply the changes and exit the dialog boxes.
8
Verify the configurationOpen a new Command Prompt window (select the Win + R keys, enter cmd, and press the Enter key).
  • Enter echo %JAVA_HOME%. You should see the path to your JDK installation.
  • Enter java -version to confirm that the system recognizes the Java installation.