Geany doesn't find javac
Solution 1
To fix this, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:
sudo apt-get install openjdk-7-jdk
Solution 2
Try fixing the issue by installing Oracle JDK 8. And try to find the correct version for the time being. Before this remove the Default Open-JDK-"version"(your Version) And try this code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
Related videos on Youtube
Joel DeWitt
For your consideration: I am a physicist. I like to calculate things. It's fun to have fun.
Updated on September 18, 2022Comments
-
Joel DeWitt over 1 year
I'm attempting to compile a Java program using Geany. I get
/bin/sh: 1: javac: not found
in the Compiler window. The available help out there suggests to make sure you have OpenJDK installed, which I do (6 & 7). Poking around, I findjavac
in/usr/share/bash-completion/completions
. (I'm hesitant to start messing around with Java on Ubuntu since it seems to be so tempermental.) How do I point Geany to my Java installation? Any suggestions will be appreciated.-
steeldriver almost 10 yearswhat are the outputs of
which javac
andupdate-alternatives --list javac
? -
Joel DeWitt almost 10 years
which javac
returns nothing;update-alternatives --list javac
returnsupdate-alternatives: error: no alternatives for javac
-
-
muru over 3 yearsYou can suggest an edit, if all this is a version change: askubuntu.com/posts/510983/edit