Reputation: 1778
Is there a difference between java.vendor and java.vm.vendor properties in Java?
It appears that the two are always the same. Is that a correction assumption?
If you know of scenarios where these two values are not the same please list them.
Edit:
I'm trying to figure out which property would tell me if current java is Oracle or Apple or OpenJDK or another JVM. Until now I checked for both of these properties. But is it safe to assume that I only need to check java.vendor?
Upvotes: 6
Views: 1965
Reputation: 28106
Due to java API, java.vendor is a java runtime environment vendor and java.vm.vendor is a java virtual machine implementation vendor. There is a number of different JVMs, so the values may differ in some specific cases. And it's not guaranted, that JVM will always return both values.
Upvotes: 2