The selected directory is not a valid tomcat home windows

I installed Tomcat with home brew brew install tomcat. On Selecting Tomcat server to add a server to the application server I get this Warning the selected directory is not a valid tomcat home.

I installed Tomcat with home brew brew install tomcat. On Selecting Tomcat server to add a server to the application server I get this

Warning the selected directory is not a valid tomcat home.

However, running catalina start starts the tomcat server on my terminal.

asked Oct 10, 2015 at 15:45

Olatunde Garuba's user avatar

Olatunde GarubaOlatunde Garuba

1,0391 gold badge16 silver badges21 bronze badges

If you are using IDEA on Linux platform, use the command:

chmod 755 -R apache-tomcat-<<Your-tomcat-version>>

Then try to restart your service again.

Fritz Duchardt's user avatar

answered Nov 15, 2017 at 7:27

jackson's user avatar

jacksonjackson

3393 silver badges7 bronze badges

1

Try selecting the libexec subdirectory in IntelliJ — i.e. /usr/local/Cellar/tomcat/8.5.9/libexec

answered Jan 16, 2017 at 7:00

Stepan's user avatar

StepanStepan

1,07610 silver badges12 bronze badges

Problem:

enter image description here

This happens because intellijIDEA doesn’t have enough permission
to read and write on the tomcat home folder, this happens on linux machines.

Solution

let your tomcat root folder = «/opt/tomcat»
then this command which will set the right privilege level for intellijIDEA.

$ sudo chmod 755 -R /opt/tomcat

enter image description here

answered Jun 15, 2020 at 5:15

robivictor's user avatar

robivictorrobivictor

3693 silver badges5 bronze badges

1

Step 1.

Download the tomcat with the tar.gz extension.
NB. The tar.gz extention

Step 2.

Unzip the file and make sure the folder name remain tomcat, save it to your library.

Step 3.

Access the preference settings on your intellijIDEA

  • Under Build, Execution and Deployment, select application server.
  • Attempt to add a new server, click + and select Tomcat Server from the drop down.
  • Click on the ... elipse to select the folder you have unziped earlier into your library.
  • select the tomcat folder and boom.

You are good to go, ready for use.

answered Oct 12, 2015 at 16:17

Surge's user avatar

SurgeSurge

2563 silver badges16 bronze badges

1

This recently came up for me on Ubuntu 17.04

What worked for me

cd /var/lib/tomcat8
rmdir lib/
ln -s /usr/share/tomcat8/lib/ .
ln -s /usr/share/tomcat8/bin/ .

I’m not sure this is the best fix but it worked for me. For some reason the default install left the tomcat8/lib directory empty while the real libraries are under the share directory.

answered Nov 21, 2017 at 0:03

kervin's user avatar

kervinkervin

11.6k5 gold badges42 silver badges58 bronze badges

I did what CallmeSurge suggested, except I had to change the following:

Step 3: Create a new Tomcat Runtime Configuration

  • Select the Runtime Configurations box (top right hand corner of the screen), and select Edit Configurations.
  • Select the green + sign at the top left corner of the box.
  • Select Tomcat (you may have to expand the box to see it)
  • Give your new configuration a name
  • In the Server tab, in the Application Server box, select the tomcat folder you created in steps 1 and 2.
  • In the Deployment tab, select the build artifact you want to deploy. (Note: if you don’t have a build artifact configured for your project, you’ll have to configure one first).
  • Save the new configuration.

Now, deploying to tomcat is as easy as selecting the runtime configuration you just created and hitting the Debug or Run arrows.

answered Jun 21, 2016 at 18:23

teuber789's user avatar

teuber789teuber789

1,43916 silver badges27 bronze badges

Authorise permissions on Tomcat folder:

  • Open tomcat location e.g. C:Program FilesApache Software FoundationTomcat 9.0

  • Double click this folder.

  • Authorise permissions.

Now try creating the server…

answered Aug 22, 2019 at 19:28

RDONALDSON's user avatar

RDONALDSONRDONALDSON

571 silver badge4 bronze badges

There may be a situation where the folder will be inaccessible to the user due to lack of rights. Try to open the root folder of Tomcat and click OK to get rights to it. This worked for me.

answered Mar 26, 2020 at 12:53

Evgeniy's user avatar

In Windows I just executed Intellij as administrator and it solved my problem.

answered Oct 25, 2020 at 16:44

Pedro Gonçalves's user avatar

I searched about how to set Tomcat as my project’s server but still haven’t figured out so let me ask you why.

I have Tomcat but get error message which say «the selected directory is not a valid Tomcat home».

Question

Can you suggest reasons why I might get this message?

jwpfox's user avatar

jwpfox

5,06411 gold badges45 silver badges42 bronze badges

asked Sep 4, 2016 at 5:46

anonyrabbit's user avatar

2

You need to select a subdirectory of your current directory, which contains tomcat executables.

In my case it was /usr/local/Cellar/tomcat/8.0.32/libexec

enter image description here

answered Sep 4, 2016 at 10:04

Vojtech Ruzicka's user avatar

Vojtech RuzickaVojtech Ruzicka

15.9k15 gold badges63 silver badges64 bronze badges

3

It’s most likely because your user account associated with IntelliJ doesn’t have permission to read the folder.

Once you grant access, you’ll be good to go.

answered Oct 19, 2019 at 20:58

Chris Dare's user avatar

Chris DareChris Dare

1511 silver badge8 bronze badges


posted 2 years ago

  • Mark post as helpful


  • send pies

    Number of slices to send:

    Optional ‘thank-you’ note:



  • Quote
  • Report post to moderator

Apache Maven, Apache Tomcat, and Idea IntelliJ are 3 different products. They should live in 3 different directories.

Usually in Windows, I’d expect to find Maven and Tomcat living in their respective directories under «

C:Program Files

«. But  in fact, neither of those products actually cares where you put them. You can just as easily put them in your home directory, for example, although if you’re planning to run Tomcat as a Windows Service, then you’re better off doing what Windows wants. Tomcat, as I said, doesn’t care. In fact, you can have 2 or 3 different versions of Tomcat installed and running on your computer at the same time.

When using IntelliJ to interact with Maven and Tomcat, you have to tell IntelliJ where the Maven and Tomcat base directories are so that it can run them, but that’s an IntelliJ thing.

I’m going to be a «small government» candidate. I’ll be the government. Just me. No one else.

The environment

  • Linux/Ubuntu20.04 LTS
  • Visual Studio Code
  • Tomcat9.0.48

abnormal

The directory selected is not the directory of Tomcat. When installing Tomcat plug-in under vscode, it is prompted to select the directory of Tomcat service, and there is no response when selecting the directory again.

The selected directory in not a valid Tomcat home

why

Insufficient directory permissions on Tomcat!

plan

  1. /usr/local/775 is rwxr-xr-x. -r means all files in the directory have the same permissions
[email protected]:/usr/local$sudo chmod 755-r apache-tomcat-9.0.48 [sudo] lauiji
  1. Check the permissions
[email protected]:/usr/local$ll Drwxr-xr-x 9 root root 4096 June 29 18:04 apache-tomcat-9.0.48/
  1. Enter the Tomcat directory to execute the operation, to see if it can run successfully, successful operation means that the current permissions are enough
Lauiji @ lauiji - siml IdeaPad - 15-2020: / usr/local/apache tomcat - 9.0.48 $. / bin/startup. Sh Using CATALINA_BASE: /usr/local/apache-tomcat-9.0.48 Using CATALINA_TMPDIR: /usr/local/apache-tomcat /temp Using JRE_HOME: /usr Using CLASSPATH: / usr/local/apache tomcat - 9.0.48 / bin/bootstrap jar: / usr/local/apache tomcat - 9.0.48 / bin/tomcat - juli. Jar Using CATALINA_OPTS: Tomcat started.

If you haven’t changed the port number, you can access localhost:8080 through your browser

  1. Close the service
Lauiji @ lauiji - siml IdeaPad - 15-2020: / usr/local/apache tomcat - 9.0.48 $. / bin/shutdown. Sh Using CATALINA_BASE: /usr/local/apache-tomcat-9.0.48 Using CATALINA_TMPDIR: /usr/local/apache-tomcat /temp Using JRE_HOME: /usr Using CLASSPATH: / usr/local/apache tomcat - 9.0.48 / bin/bootstrap jar: / usr/local/apache tomcat - 9.0.48 / bin/tomcat - juli. Jar Using CATALINA_OPTS: NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
  1. Reselect Tomcat to /usr/local/apache-tomcat-9.0.48 under vscode

In the rainy season, eat the rainbow

Понравилась статья? Поделить с друзьями:
  • The saboteur тормозит на windows 10
  • The saboteur патч для windows 10
  • The saboteur не запускается на windows 10
  • The saboteur настройки графики windows 10
  • The saboteur как настроить графику на windows 10