Java problem: no Java runtime present, requesting install

By Xah Lee. Date: .

while updating my Java Tutorial, run into this problem.

no Java runtime present, requesting install
javac macos bug 2020-03-05 m8smh
javac macOS bug 2020-03-05

Apparently, the problem is environment variable $JAVA_HOME is not set.

Also, since macOS default shell is now zsh, now you need zsh syntax, and see how or if emacs reads that. Lots little problems.

Shit. The unavoidable comes. Now i need to learn about setting up env var in zsh. One prob leads to another. Faak programers.

The story of programing. While i was updating my java tutorial unassuming, suddenly, my emacs command to compile java source code no longer works. Ok, stackoverflow, so apparently i am missing $JAVA_HOME. But i have java and javac, i really shouldn't need faaking $JAVA_HOME. Ok, set it in bash. But, macOS switched to zsh as default shell. And am starting emacs from zsh. So, indeed, emacs does not get environment variable from .Bash_profile. So i need to read about how to set environment variable in zsh. Faak programers

Complexity and Tedium of Software Engineering

I am the logger of programer's crimes. Especially the unix linux hacker faakheads.

And today, this java home problem, is one illustration of it. Why the software industry, programers, langs, forever r shit. With javascript fashion faakheads and unix linux perl python lisp haskell hacker types telling you what to do.

Ok. Now, zsh syntax for env var is same as bash. Just JAVA_HOME="/usr/libexec/java_home" export JAVA_HOME in .zshrc easy. But now,

Unable to locate an executable at "/usr/libexec/java_home/bin/java" (-1)

Looks like i need to install the Oracle JDE faak. Faak programers. Faak oracle. Faak Sun Microsystems, the most greedy and jargon abusing corp.

ok, now finally. solution is to install JDK (which is Sun Microsystems invented jargon. “java 1.x to 1.2 == Java 2 now 1.3, JavaOne, JFC, Jini, JavaBeans, entity Beans, Awk, Swing faaking stupid Java and faak Sun Microsystems” )

Sun Microsystems, the most egregious abuser of jargons. Jargons of Software Industry

oracle download java 2020-03-05 fkxx8
screenshot of Oracle download java page 2020-03-05

Ok, now seems to work.

java version terminal 2020-03-05 kyq9c
java version terminal 2020-03-05

But now, back to solve the relation of emacs and zsh env var problems. By the way, env var is the worst faak in computing created by the unix faakheads. If you functional programing fan, you know what i am talking about.

java compile error in emacs 2020-03-05 gct6k
java compile error in emacs 2020-03-05

New branching twist. Now, apparently, macOS 10.15.3 (Catalina), the “/Applications” dir is changed to “/System/Applications”. If you have a shell command to open app in /Applications, it'll fail.

find out macOS version by command line:

sw_vers -productVersion

system_profiler SPSoftwareDataType

after 2.5 hours and 17 tabs, finally, problem solved.

java problem browser tabs 2020-03-05 4ymnj
java problem browser tabs 2020-03-05