Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 354
Patoshi パトシ Avatar asked Oct 22 '25 11:10

Patoshi パトシ


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
like image 71
jeprubio Avatar answered Oct 24 '25 01:10

jeprubio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!