Eclipse can't see /usr/local folder on mac

5.2k views Asked by At

I am developing a web application in Java on my mac. The web application will run on tomcat. I have installed tomcat in /usr/local/apache-tomcat.

When I try to set the tomcat runtime in Server->Runtime Environments, I am not able to see the folder /usr/local. how do I get eclipse to see the /usr/local/apache-tomcat directory?

I am able to see /usr/local when using the Go to Folder option in Finder.

enter image description here

5

There are 5 answers

3
Andrew Eisenberg On

My guess is that you have your finder settings that hide hidden folders. It is possible to show them by following the instructions in this article.

The easiest way to do this is to type the following in your terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

If you type out the full name of the installation folder instead of using the finder, does it work?

0
Praveen On

I had similar problem with loading external jar files in /usr/local/ for Eclipse on Mac The way i resolved this was to create a soft-link using ln -s to the folder in /usr/local to a visible folder and then loaded the jars.

ln -s source visible_location/link 

Works for me.

0
hd84335 On

I just got a similar problem, and the workaround i found is to copy/paste the path of your tomcat base directory, and it works fine:

  1. Go to your tomcat base directory
  2. pwd to get the path and copy it
  3. Go to eclipse -> preferences -> servers -> runtime environments -> add button -> select apache tomcat version -> then next
  4. At this step, instead of browsing, you can simply paste the copied path in the Tomcat installation directory field!

enter image description here

et voilĂ 

0
Pete On

When you go to choose the folder, press 'Cmd + Shift + G' in the dialog box. This brings up a prompt where you can enter the path

0
Dieglock On

You can easily control hidden files writing this in bash_profile

alias hideOn='defaults write com.apple.finder AppleShowAllFiles TRUE'
alias hideOff='defaults write com.apple.finder AppleShowAllFiles FALSE'
alias kFinder='killAll Finder'
alias hOn='hideOn && kFinder'
alias hOff='hideOff && kFinder'

Then, reopen your terminal and write hOn. At root folder you will see hidden /usr. Just put it in your finder sidebar. Then write hOff and you will stop seeing the hidden files, but /usr will be always there at finder.