captain monk
captain monk

Reputation: 727

Where can i find which version of java my pc uses

My pc runs windows 7. Where exactly can i find which java version my pc uses (Probably i use jdk_8 version)? My goal is to find which one of these versions:

is the equivalent for linux.

Upvotes: 0

Views: 158

Answers (5)

Vy Do
Vy Do

Reputation: 52488

We use simple Java program: Create file Check.java , complie by javac tool and run this by java tool (these tools in directory %JAVA_HOME%\bin )

public class Check {
    public static void main(String[] args) {
        System.out.println("Java Runtime Environment version is " + System.getProperty("java.version"));
    }

}

//        Result:
//        Java Runtime Environment version is 1.8.0_20

Upvotes: 0

StackFlowed
StackFlowed

Reputation: 6816

run this command in dos java -help to see all options and java -version you should get the some details.

Upvotes: 1

Elliott Frisch
Elliott Frisch

Reputation: 201409

None of the versions you've listed are Java 8 for linux. The closest is openjdk-7-jre-headless, but that's Java 7. The gcj is part of gcc. To determine the version in Windows you can run,

java -version

or

java -fullversion

Upvotes: 1

jj172
jj172

Reputation: 809

In the windows command line, enter the following command:

java -version 

You can find more info here: http://introcs.cs.princeton.edu/java/15inout/windows-cmd.html

Upvotes: 1

M A
M A

Reputation: 72844

Open a cmd terminal and run java -version.

Upvotes: 1

Related Questions