VPS & omat palvelimet (verkkohotellihallintakeskus) Ohje

How to check my Java version on CentOS

java is a utility program for starting Java applications. It creates a runtime environment, loads the specified class, and then invokes that class's main() method. If the optional -jar command-line parameter is specified, instead of getting the initial class name from the command line, the program reads the initial class from the manifest file within the specified JAR file. There are many command line options available to help configure the runtime environment, like to increase available memory, identify where to find needed classes/libraries, or display the version information.

Warning: GoDaddy's shared hosting accounts do not support Java.
DIFFICULTY Basic - 1 | Medium - 2 | Advanced - 3
RELATED PRODUCTS Linux-based VPS or dedicated servers

To find out what version of Java you are using, just pass the -version command-line option to the tool:

java -version

As long as you have classnames set up, there is a second command-line option of -showversion.

java -showversion Test

Oliko tästä artikkelista hyötyä?
Thanks for your feedback. To speak with a customer service representative, please use the support phone number or chat option above.
Kiva, että meistä oli apua. Voimmeko tehdä jotain muuta?
Olen pahoillani asiasta. Tell us what was confusing or why the solution didn’t solve your problem.