You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent incorrectly assumes that JVM version == JDK version #136
We at BellSoft have JDK 8 with underlying JVM 17. If I run my Java8 application on my JDK with DataDog agent, I get a crash like this one
In reality, it's possible (and correct) to check the JVM version, not JDK. For example, the property java.vm.version contains 17.0.9+10-LTS in our case.
Aargh ...
Would it possible to find something distinctive? Java 8 will put 25.* into that system property. While we could hard-code '25 == 8', once we get proper JDK 25, this will get incredibly messy.
I just want to make sure what would be the right cause of action - currently, we are reading java.vm.version to retrieve the JVM version. But it does return value 17, since you are running JVM 17 there. But the version returned by java.runtime.version would be '8.*' I assume, correct? And the code that is crashing is actually using the JDK functionality and as such we would have to have two versions - vm and jdk, right? And then check all occasions where we guard some functionality based on the Java version and decide whether it is JVM or JDK related.
@jbachorik sorry for causing chaos! There are many questions here; I have only some answers and can grab more. If it will help I can privately send you a build of our JDK for you to check everything you need
Aargh ... Would it possible to find something distinctive? Java 8 will put 25.* into that system property. While we could hard-code '25 == 8', once we get proper JDK 25, this will get incredibly messy.
I just want to make sure what would be the right cause of action - currently, we are reading java.vm.version to retrieve the JVM version. But it does return value 17, since you are running JVM 17 there. But the version returned by java.runtime.version would be '8.*' I assume, correct? And the code that is crashing is actually using the JDK functionality and as such we would have to have two versions - vm and jdk, right? And then check all occasions where we guard some functionality based on the Java version and decide whether it is JVM or JDK related.
Yes. You're correct. java.runtime.version still has something like "1.8.0_*".
Activity
jbachorik commentedon Oct 11, 2024
Aargh ...
Would it possible to find something distinctive? Java 8 will put
25.*into that system property. While we could hard-code '25 == 8', once we get proper JDK 25, this will get incredibly messy.I just want to make sure what would be the right cause of action - currently, we are reading
java.vm.versionto retrieve the JVM version. But it does return value 17, since you are running JVM 17 there. But the version returned byjava.runtime.versionwould be '8.*' I assume, correct? And the code that is crashing is actually using the JDK functionality and as such we would have to have two versions - vm and jdk, right? And then check all occasions where we guard some functionality based on the Java version and decide whether it is JVM or JDK related.asm0dey commentedon Oct 11, 2024
@jbachorik sorry for causing chaos! There are many questions here; I have only some answers and can grab more. If it will help I can privately send you a build of our JDK for you to check everything you need
jbachorik commentedon Oct 11, 2024
yes, this would be very helpful
dpochepk commentedon Oct 11, 2024
Yes. You're correct. java.runtime.version still has something like "1.8.0_*".
asm0dey commentedon Oct 12, 2024
@jbachorik I've sent a mail to your address I found here on GH, could you please answer when you have a minute?
jbachorik commentedon Oct 29, 2024
Fixed in #142