License Type | SaaS & On-Premise |
Agent Mode | Assess & Protect |
Main Product Category | Java Agent |
Sub Category | Onboarding |
Issue
Out of the box, the Contrast Java agent v3.5.7+ is unable to successfully instrument applications running on IBM JRE 5. This results in the JVM being unable to start.
Cause
An unfixed bug in IBM JRE 5 prevents the Contrast agent from injecting its sensors into the correct package on startup.
Resolution
While this bug is resolved in newer versions of the IBM JRE, the following steps will allow you to circumvent it and run the Contrast Java agent successfully with IBM JRE 5:
- From the same directory as your
contrast.jar
, execute the following command:jar -xf contrast.jar java-base-injections.jar
This extracts a JAR from within the Contrast agent JAR file, saving asjava-base-injections.jar
in the current directory. - Add the following flags to your applications JVM parameters:
-Xbootclasspath/p:java-base-injections.jar -javaagent:contrast.jar
- Finally, start your application as usual to launch it with the Contrast agent.