Determine java version used to call a program -


this question has answer here:

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

Popular posts from this blog

java - Ebean enhancement ignores a model -

ubuntu - How to disable Kernel Module Signing in linux -

SQL php on different pages to Insert (mysqli) -