problem with java & tomcat

Joined
Jun 11, 2012
Messages
285
Reaction score
13
Points
18
my terminal tells me Java and tomcat are already installed in my MacBook Pro (a fairly new one, now running Ventura 13.2.1) but when I search for "java" or "tomcat" in the computer I can't find them...

and indeed I did install them.. and when I type in the commands to install them again, it says they're already installed, but I just can't find them when I search..

also when I run command "java" I get error too.. it says:
The operation couldn’t be completed. Unable to locate a Java Runtime that supports javac.

and if I try to install Java again it says:
Warning: openjdk 19.0.2 is already installed and up-to-date

so it installed java but not the java compiler?

also, when I google it, it says java is installed in /Library/Java/JavaVirtualMachines/
it's just not there.. I also searched for JavaVirtualMachines, it's not there..


I also installed Homebrew, and I also can't find it anywhere when I search for it..

this is ridiculous.. I don't like not knowing where things are installed in my computer...

so why can't I find where these things are installed?

would appreciate suggestions.. thank you..
 
OP
K
Joined
Jun 11, 2012
Messages
285
Reaction score
13
Points
18
I also installed Tomcat, and I also can't find the installation when I search for it...
I don't get this...
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,773
Reaction score
2,114
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Not sure how you installed all of these, but Homebrew, for example, installs the brew as a link in the /usr/local/bin directory pointing to its real location. Since /usr/local/bin is in your default path, brew works.

All packages from Homebrew end up in the /usr/local/Cellar folder, as would Tomcat.

If you install OpenJDK through HB, it won't go to the /Library/Java folder. If you install OpenJDK through an independent installer, it might end up there.

Either way, in the terminal "echo $PATH" to show you what folders you are looking in and that'll tell you where you are looking for things and if your things are in a different folder, you'll have to adjust the path to compensate.
 
OP
K
Joined
Jun 11, 2012
Messages
285
Reaction score
13
Points
18
hi, thank you for your help.. now when I do "echo $PATH" I get this..

/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin:/opt/homebrew/bin
???
(I did set the path for it the other day.. (but wasn't if I had set it, so set it again and this is what I get now when I do echo $PATH...))

Cryptexes? I can't find a dir by that name in my computer..

I also can't find a dir "Cellar" in my computer..

and, as I said, I can't find any dir or file named "tomcat"..

so where is the stuff I have installed with Homebew (so far, Java and Tomcat)? I simply can't find them anywhere in my computer... the Tomcat installation comes comes with a bunch of dirs, among them a dir webapps, which is where you put the websites in Tomcat.. can't find any of it...

thanks again..
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top