How do I install only JRE (not JDK) using homebrew on macOS?
Asked
Active
Viewed 1.4k times
4
-
What did you already try? – CodeF0x Nov 22 '18 at 12:58
-
can explain your question in details? because you can't develop java programs only with JRE You will need JDK for compiling your programs.JRE provides only runtime environment,but JDK is something you will need to compile your code to make them executable by your JRE.You will need javac for compiling your code which is present in JDK. – Harsh Shah Nov 22 '18 at 12:59
-
@CodeF0x I know, that `brew cask install java` installs the JDK and on Ubuntu it's `sudo apt install default-jre` (This does install JDK, doesn't it? Although it's named `default-jre`). What I tried is searching the internet for JRE and brew – user1 Nov 22 '18 at 13:00
-
@HarshShah What details do you need? I simply do not want to install the whole JDK – user1 Nov 22 '18 at 13:02
-
3If you want to install Java 11, then there is no separate JRE anymore. See https://stackoverflow.com/questions/52584888/how-to-use-jdk-without-jre-in-java-11 – Wim Deblauwe Nov 22 '18 at 13:21
-
@WimDeblauwe This question became a "Popular Question" (1k views). Maybe you want to add your comment as an answer, which I would accept. – user1 Sep 08 '19 at 11:06
1 Answers
3
If you want to install Java 11, there is no separate JRE anymore. See How to use jdk without jre in Java 11

Wim Deblauwe
- 25,113
- 20
- 133
- 211