Ubuntu Java Application Not finding the command javac when java 11 is confirmed installed

Viewed 2850

I am trying to run a java application, but its saying javac not found. When I did install java by using the following command:

sudo apt install openjdk-11-jre-headless

It's in my path as I can run java command fine. I'm not sure why it isn't seeing the javac command. What am I missing after installing openjdk-11 java ?

enter image description here

1 Answers

You have installed the Java Runtime Environment (JRE): openjdk-11-jre which allows you to run java software.

And should install the Java Developer Kit (JDK) in order to compile code:

sudo apt install openjdk-11-jdk
Related