Setting Java Development Kit (JDK) Environment Variables
In Provar, Apache ANT can run a Provar test suite via the command line or a Continuous Integration (CI) server such as Jenkins. Before generating a build file, install Java Development Kit (JDK) and configure the environment variables. You can follow the steps below to complete these actions.
How To Install Java Development Kit
Step 1: Download a compatible version of Java JDK. We recommend Amazon Corretto 11.
Compatible versions include:
- 18.104.22.168, 22.214.171.124, 126.96.36.199, 188.8.131.52, 184.108.40.206
Note: You can reference the Java version mismatch error support article to learn how to resolve related error messages.
Step 2: Complete the installation by following the prompts. Be sure to take note of the installation directory information, e.g., C:\Program Files\Java\jdk1.8.0_221. You will need to add this information to the environment variable settings later.
Set the JAVA_HOME Environment Variable on a Windows Machine
Step 1: Open the System Control panel. Then select the Advanced tab.
Above: View the Advanced tab within System Properties.
Step 2: Click the Environment Variables button. The following dialog box will appear.
Above: View of the Environment Variables dialog box.
Step 3: Click the New button below System variables.
Step 4: Within the Variable name field, enter JAVA_HOME. Within the Variable value field, enter the directory where Java JDK was extracted previously, e.g., C:\Program Files\Java\jdk1.8.0_221.
Step 5: Then click the OK button.
Above: View of New System Variable dialog box.
Step 6: Click the Edit button to the Path variable in the System variables section.
Step 7: Click the New button and type %JAVA_HOME%\bin in the row at the bottom of the list.
Step 8: Click OK and restart your system.
Step 9: To verify that you have installed the correct Java version, open the command prompt and type the following command:
Set the JAVA_HOME Environment Variable on a Mac
Step 1: Navigate to your user home directory. The fastest way to do this is to use Shift + Command + H or open Finder, select Go in the menubar, and click Home.
Step 2: Find the .bash_profile. The .bash_profile may be hidden. If so, use command+shift+period to make hidden files visible.
Note: The command above does include a period/dot after the second plus sign.
Step 3: If you still do not see the .bash_profile, use the following command within the terminal to display the file:
Step 4: Right-click on the .bash_profile file and select Open With > TextEdit.
Step 5: Add the following command:
Step 6: Export JAVA_HOME to PATH with the following command:
Step 7: Now restart your machine or use the following command:
Step 8: Type the following command:
Note: It should now display the JDK version information. The subversion may be different from the screenshot below.
Other Related Support Articles for Reference
- Provar Automation
- Installing Provar Automation
- Updating Provar Automation
- Using Provar Automation
- API Testing
- Behavior-Driven Development
- Creating and Importing Projects
- Creating Test Cases
- Custom Table Mapping
- Debugging Tests
- Defining a Namespace Prefix on a Connection
- Defining Proxy Settings
- Environment Management
- Exporting Test Cases into a PDF
- Exporting Test Projects
- Override Auto-Retry for Test Step
- Managing Test Steps
- Namespace Org Testing
- Provar Desktop
- Provar Test Builder
- Refresh and Recompile
- Reintroduction of CLI License Check
- Reload Org Cache
- Running Tests
- Searching Provar with Find Usages
- Secrets Management and Encryption
- Setup and Teardown Test Cases
- Tags and Service Level Agreements (SLAs)
- Test Cycles
- Test Plans
- Testing Browser Options
- Tooltip Testing
- Using the Test Palette
- Test Palette Introduction
- Control Test Steps
- Generate Test Case
- List Compare
- Page Object Cleaner
- Read Test Step
- String Test Steps
- UI Test Steps
- Using Custom APIs
- Callable Tests
- Data-Driven Testing
- Page Objects
- Block Locator Strategies
- Introduction to XPaths
- Creating an XPath
- Label Locator Strategies
- Maintaining Page Objects
- Mapping Non-Salesforce fields
- Page Object Operations
- Refresh and Reselect Field Locators in Test Builder
- Using Java Method Annotations for Custom Objects
- Applications Testing
- Database Testing
- Document Testing
- Email Testing
- Mobile Testing
- OrchestraCMS Testing
- Guide in Salesforce CPQ Testing in Automation
- Guide in ServiceMax Testing
- Skuid Testing
- Vlocity API Testing
- Webservices Testing
- Provar Manager
- Introduction to Test Scheduling
- Apache Ant
- Configuration for Sending Emails via the Automation Command Line Interface
- Continuous Integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Automation secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- Gearset DevOps CI/CD
- GitHub Actions
- Integrating GitHub Actions CI to Run Automation CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Salesforce DX
- Team Foundation Server
- Version Control
- Salesforce Testing
- Adding a Salesforce Connection
- Assert Page Error Messages on Add/Edit Product
- Internationalization Support
- List and Table Testing
- Salesforce Console Testing
- Salesforce Lightning Testing
- Salesforce Lightning Web Component (LWC) Locator Support
- Salesforce Release Updates
- Visualforce Testing
- Best Practices
- Configurations and Permissions
- Error Messages
- Licensing, Installation and Firewalls
- Test Builder and Test Cases
- Release Notes