Reputation: 727
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
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
Reputation: 6816
run this command in dos java -help to see all options and java -version you should get the some details.
Upvotes: 1
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
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