javaubuntu-16.04jshell

The program 'jshell' is currently not installed when trying to run jshell on Ubuntu


I have downloaded and "manually" installed JDK 10 for Linux 64bit edition (for Ubuntu 16.04), Oracle Java SE Development Kit (note: I wanted to download the Java9 JDK but this is no longer supported and I was referred to the Java 10 SE Development kit instead).

When I try running jshell from a terminal window I get the following error,

The program 'jshell' is currently not installed. To run 'jshell' please ask your administrator to install the package 'openjdk-9-jdk-headless' You will have to enable the component called 'universe'

enter image description here

enter image description here

enter image description here

enter image description here

I dont know why the message is asking me to install openjdk when I have installed the classic java version. When I run "which jshell" I dont get any details returned.

Can anyone help me get jshell installed and working ?


Solution

  • JShell is a development tool. You should download and install the Java Development Kit to run jshell, not just the Java Runtime Environment.