Setting Java Development Kit (JDK) environment variables
In Provar, Apache Ant can be used to run a Provar test suite via the command line or you can use a Continuous Integration (CI) server such as Jenkins.
Before a build file can be generated, first install Java Development Kit (JDK) and configure the environment variables. You can follow the steps below to complete these actions.
Install Java JDK
Step 1: Download the compatible version of Java JDK. Visit the Oracle website and download a compatible version of Java JDK.
Compatible versions include:
- 220.127.116.11, 18.104.22.168, 22.214.171.124, 126.96.36.199, 188.8.131.52
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 as part of the environment variable settings later in this process.
Set the JAVA_HOME environment variable on a Windows machine
Step 1: Open the System Control panel. Then select the Advanced tab.
Above: View of 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: Go to the Path variable within the System variables section and click on the Edit button.
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 using Shift + Command + H or you can open Finder, select Go in the menubar and then 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
- General information
- Licensing Provar
- Provar trial guide and extensions
- Using Provar
- 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
- Managing test steps
- Namespace org testing
- Provar desktop
- Provar Test Builder
- Refresh and Recompile
- 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
- List compare
- 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
- Salesforce CPQ testing
- ServiceMax testing
- Skuid testing
- Vlocity testing
- Webservices testing
- Introduction to test scheduling
- Apache Ant
- Configuration for sending emails via the Provar Command Line Interface (CLI)
- Continuous integration
- Azure DevOps
- Running a Provar CI task in Azure DevOps
- Configuring the Provar 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
- GitHub Actions
- Running a Provar CI task in GitHub Actions
- 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 CI
- Travis CI
- Parallel Execution
- Running Provar on Linux
- Salesforce DX
- Team foundation server
- Version control
- Zephyr Cloud and Server
- Salesforce testing
- Adding a Salesforce connection
- Assert Page Error Messages on Add/Edit Product
- Dynamic Forms
- Internationalization support
- List and table testing
- Salesforce Release Updates
- Salesforce Lightning Testing
- Salesforce Lightning Web Component (LWC) locator support
- Salesforce console testing
- Visualforce Testing
- Testing best practices
- Configurations and permissions
- Error messages
- Licensing, installation and firewalls
- Test Builder and test cases
- Release notes