Hot-Deploy Error: IllegalStateException: Cannot find the system Java compiler

I am new to CUBA platform and working through the Full Scale Application tutorial.

While using the application after a hot-deployed change, however, I am getting the error in the title of this post. It is identical to an issue another user had a while back and appears to have something to do with the Tomcat server using a JRE instead of the JDK.

However, I am unable to find a way to point Tomcat to the JDK instead. I am running LinuxMint 18 and have set my JAVA_HOME environment variable to point to the same JDK that CUBA Studio is using.

Execute env | grep java in Terminal and see which environment variables are set. JAVA_HOME should point to JDK. And JRE_HOME (if set) - too. It means, javac should be in the %JAVA_HOME%/bin folder.