Java
Environment Variables
The key to getting Qtap working with Java is setting the correct environment variables. There are two important variables to set:
QPOINT_STRATEGY
: This should be set to "forward" for Qtap's forwarding mode.TRUST_STORE
: This should point to the Java trust store location.
Locate the Java Trust Store
The location of the trust store can vary depending on your Java version. You're looking for the path to cacerts
. Here's how to find it:
For OpenJDK, it's typically located at:
/usr/local/openjdk-<version>/lib/security/cacerts
Replace
<version>
with your Java version number (e.g., 17, 11, etc.)For Oracle Java, it's usually at:
$JAVA_HOME/jre/lib/security/cacerts
Update Your Environment
Modify your environment to include the necessary environment variables. Here's an example of a Dockerfile:
Make sure to adjust the TRUST_STORE
path if you're using a different Java version or distribution.
Deploy Qtap
Ensure Qtap is deployed and running in your environment. You can do this using the Docker or Kubernetes deployment methods described in the Qtap documentation.
Deploy Your Java Application
With Qtap running and the environment variables set, you can now deploy your Java application. The application will use the environment variables to properly interact with Qtap.
Your Java application must come online after Qtap! Redeploying the app may be necessary.
Verify the Setup
After deploying your Java application, you can verify that it's properly using Qtap by checking the Qtap logs or monitoring interface for traffic from your Java application.
Troubleshooting
If you encounter issues:
Double-check that the
TRUST_STORE
path is correct for your Java version and distribution.Ensure Qtap is properly deployed and running before starting your Java application.
Check the Qtap logs for any error messages related to the Java application's connections.
Remember, you may need to adjust these instructions slightly based on your specific Java version, distribution, and deployment environment.
Last updated