Determine java version used to call a program -
this question has answer here:
- how find jvm version program? 10 answers
i'm trying determine inside application java version used call jar.
i saw solutions talking system.getproperty(java.version), if user have different versions of java, , command this:
c:\absolute\path\to\java\1.5\java -jar something.jar is there way know real java version?
you should use system.getproperty("java.version"). give version of currently running jvm string, , can check prefix 1.5 or 1.6, , have version of java.
also check this question, , docs system.getproperty(...).
hope helps.
Comments
Post a Comment