See what java version you have

How can I tell what version of Java I have installed?

I want to start toying around with java (eventually getting to the point where I can write basic little programs for android or web), but I’ve managed to have java messed up on my computer (from past experiments). I’m not sure which version of java I have, and would like to know if there is a command to see the version of java that is installed and active. Also, which version works best? All this on 32bit Ubuntu 12.04 EDIT:
Ok, so it seems like I have both openjdk 6 and 7, with openjdk 7 in use. I want to use openjdk 7, so how do I uninstall openjdk 6? Is just via USC good enough or is there a command that should be run?

4 Answers 4

update-java-alternatives -l shows you all the Java versions you have installed.

java -version shows you the Java version you are using.

Читайте также:  Script src html file

java -showversion shows you the Java version you are using and help.

Normally it would be OpenJDK.

This command should tell you what is currently providing the Java virtual machine ( java ) and the Java compiler ( javac ):

file /etc/alternatives/java /etc/alternatives/javac 

This assumes the «alternatives» system is working properly, which might not be the case, depending on how Java has been «messed up» in the past. To check this, run:

If the alternatives system is working correctly and being used by Java, then you should see:

/usr/bin/java: symbolic link to `/etc/alternatives/java' /usr/bin/javac: symbolic link to `/etc/alternatives/javac' 

Otherwise please edit your question to provide details. Then it should be possible to give a more specific answer.

You can remove openjdk-6 with the Software Center. There are multiple packages associated with it, so you may need to remove more than one packages. (All the `openjdk-6 packages are listed here.)

Or you can use the command-line:

sudo apt-get remove openjdk-6-\* icedtea-6-\* 

However, whichever method you use, you may want to check first to see what depends on these packages—you might have software installed that specifically needs version 6. (Probably not, but possibly.)

You can check for this by simulating the removal operation on the command-line:

apt-get -s remove openjdk-6-\* icedtea-6-\* 

This will show you the effects of removing those packages, including what other packages would be removed as well. (You’ll notice that since this is a simulation, you don’t need sudo .)

If you want to be able to continue using Java content online in your web browser (this is not the same thing as JavaScript), then before you remove any icedtea-6- or openjdk-6- packages (except perhaps openjdk-6-jdk ), you should make sure you have icedtea-7- packages installed corresponding to whatever icedtea-6- packages are installed.

Источник

What version of Java am I using?

NOTE: The latest version of major browsers like Chrome and Firefox does not support NPAPI plugins anymore (except for Flash). This means the some plugins like Java, Microsoft Silverlight and Adobe Acrobat will not work anymore out of the box. The reason is because they make browsing slower, less secure and more likely to crash. In replacement, browser makers have implemented various Web APIs so that websites can do the same things they’ve always done using plugins.

For some applications and Websites to run properly you must have Java installed on your Computer. To visit the official java page, click here. The page automatically detects java installed on your computer and shows the version of Java installed.

Note: An important caveat is that you can have many installations of Java on your computer. You should test each of your web browsers on this page as they could be using different versions of Java.

The easiest way to find your Java version is using the Command Prompt (for Windows) or Terminal (for macOs or Linux).

On Windows Command Prompt

  1. Open the Command Prompt.
  2. Type java -version and hit enter.
  3. The first line that comes back is your version, e.g. java version «1.6.0_15»

What version of java in command prompt window.

On Windows 10

  1. Click the Start button.
  2. Scroll through the applications and programs listed until you see the Java folder.
  3. Click on the Java folder, then About Java to see the Java version.

On Windows 8

  1. Right-click on the screen at bottom-left corner and choose the Control Panel from the pop-up menu.
  2. When the Control Panel appears, select Programs.
  3. Click Programs and Features.
  4. The installed Java version(s) are listed.

On Windows 7

  1. Click Start
  2. Select Control Panel
  3. Select Programs
  4. Click Programs and Features
  5. The installed Java version(s) are listed.

On macOs

  1. Open the Spotlight Search by pressing following keys: command + spacebar .
  2. Type terminal and press enter.
  3. On the Termimal window, type java -version and press enter.
  4. The first line that comes back is your version, e.g. java version «1.6.0_15»

What version of java in terminal window.

On Linux

  1. Press the following keys: CTRL + ALT + T (shortcut for Terminal in Linux).
  2. On the Termimal window, type java -version and press enter.

What version of java in terminal window.

  1. Home
  2. What is my Browser
  3. Check Chrome version
  4. Check Safari version
  5. Check Firefox version
  6. Check Edge version
  7. Check IE version
  8. Check Opera version
  9. Check UC Browser version
  10. Check MS Outlook version
  11. Check Flash version
  12. Check Java version
  13. Check iTunes version
  14. Check Windows Version
  15. Check Linux version
  16. Check Mac version
  17. Check Minecraft version
  18. Check Android version
  19. Check MS Office version
  20. Check Skype version
  21. Check Antivirus Version

Источник

How do I check what version of Java I have installed?

I want to check what version of Java is installed on my PC before installing the latest Java update. How can I do this?

5 Answers 5

You can check your version of Java with any of the following methods.

Java Control Panel (Windows)

  1. Open the Start Menu and select Control Panel.
  2. From the Control Panel, select Programs -> Java to open the Java Control Panel.

Java version from Java Control Panel

Command Line (Windows)

Opening CMD with Run tool

Java version from command line

Control Panel (Windows)

Note: This method may give inaccurate results if Java’s PATH has not been updated.

  1. Open the Start Menu and select Control Panel.
  2. From the Control Panel, select Programs -> Programs and Features.
  3. Scroll down the list of programs until you find the most recently installed version of Java

Java version from Windows Control Panel

Terminal (MacOS)

Searching for Terminal.app in Finder

Java version in MacOS terminal

Sources

Источник

How to Check Java Version on Mac or Windows

Java runs many of the applications that we use daily. Many applications cannot run on older versions of Java. Hence, it is essential to know which version is installed on your system.

In this tutorial, learn how to check the Java version on your Mac or Windows system.

How to Check if Java is Installed and version on mac or windows

  • A system running macOS or Windows
  • Access to the command-line/terminal window
  • A version of Java installed

Check Java Version on Mac

You can find the version of Java on macOS by:

  • using the GUI (Mac’s System Preferences)
  • prompting for the version in the terminal window

Option 1: Check Java Version on Mac Using the GUI

To check the Java version on Mac without using the terminal by searching for the Java Control Panel in the System Preferences.

1. Click the Apple icon in the menu bar to open the drop-down menu and navigate to System Preferences.

Finding system preferences on Mac

2. A new window opens with various icons and settings. Find and click the Java icon to open the Java Control Panel.

Opening the Java control panel on Mac os

3. Once the Java Control Panel opens, click the About button. A new window with Java version information should appear.

Finding the Java version on macOS from the system preferences

Option 2: Check Java Version on Mac Using the Terminal

If you prefer using the terminal, checking the Java version is a simple one-command process.

1. First, open the terminal. To do so, click the Spotlight Search button in the top-right of the screen.

Mac spotlight search button.

2. Type terminal in the search bar and open it by clicking on the icon in the search results.

Open terminal on Mac.

3. Once in the command line, run the command: java -version . The output should display the Java version installed on your MacOS.

java version 1.8.0_261 installed on macOS

To check the version of the primary Java compiler – javac (pronounced “java-see”) use the command:

Note: If you have a Linux system, refer to How To Check Java Version Installed On Linux.

Check Java Version on Windows

To check the Java version on a Windows computer, you can use:

Option 1: Check Java Version on Windows Using GUI

To find the Java version on your Windows without opening a terminal window, use the Control Panel.

1. Open the Windows menu in the bottom-left corner and type control panel in the search bar.

Searching for the control panel in the Windows start menu.

2. Find the Control Panel in the search results and click the icon to open it.

Opening the control panel on Windows

3. Move to the Programs directory.

screenshot of the Open programs directory in Windows

4. Find and click the Java icon to open the Java Control Panel.

example of opening the Java Control Panel

5. Once the control panel opens, click the About button.

Viewing information about the Java control panel

6. The About Java window should appear and display the Java version on your computer.

example output of java version 8 update 261 installed on windows

Option 2: Check Java Version on Windows Using Command Line

Another option to find the Java version on Windows is through the command line.

1. Open the Windows Start menu in the bottom-left corner and type cmd in the search bar.

Search for command prompt on Windows

2. Then, open the Command Prompt once it appears in the search results.

Open command prompt on Windows

3. A new window with the command prompt should appear. In it, type the command java -version and hit Enter. The output should display the Java version installed on your Windows system.

java version 1.8.0_261 installed on windows

You can also check the version of the Java’s primary compiler, javac, with the command:

This article showed you how to check the version of Java installed on a macOS or Windows system.

Источник

Оцените статью