title: tomcat [Ubuntu] - Warning: The selected directory is not a valid Tomcat home
body: <p>I have installed Tomcat 9 in my PC (on Ubuntu 16.04). </p>
  
  <p><a href="https://i.stack.imgur.com/2YOh3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2YOh3.png" alt="Tomcat path"></a></p>
  
  <p>I also successfully started the server in port 8080. </p>
  
  <p><a href="https://i.stack.imgur.com/zDM2B.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zDM2B.png" alt="enter image description here"></a></p>
  
  <p>The problem is, when I try to configure Intellij IDEA to run a Tomcat server, it throws the following error:</p>
  
  <p><a href="https://i.stack.imgur.com/oF3u0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oF3u0.png" alt="Intellij IDEA Tomcat path error"></a></p>
  
  <p>I don't know what the problem with the <code>Tomcat home: opt/tomcat</code> is since i have no other tomcat folder on my PC, and as shown, it works perfectly. I have tried putting inner <code>opt/tomcat</code> folders, like <code>Tomcat home: opt/tomcat/bin</code> or <code>Tomcat home: opt/tomcat/lib</code> (where executables are), but it doesn't work either.</p>