79679141

Date: 2025-06-25 13:43:40
Score: 0.5
Natty:
Report link

Have you tried working with macOS’s built-in java_home path (/usr/libexec/java_home)?

Lately, I've run into issues where Android Studio overrides the JAVA version, which causes problems — especially with tools like keytool. I’d like to understand how you’re setting JAVA at that point. Could you share the exact command you're using?

Also, can you confirm the outputs of the following commands — are they consistent or different?

If everything looks correct so far, try checking whether keytool is accessible like java or adb. If it’s not found, it might mean the system isn't detecting keytool.

In that case, try using the full path:

"$JAVA_HOME/bin/keytool"

This helped me resolve the issue and correctly update the cacerts. Let me know if that works for you.

sudo "$JAVA_HOME/bin/keytool" -import -trustcacerts \
 -alias <Your alias> \
 -file <your CRT file> \
 -keystore "$JAVA_HOME/lib/security/cacerts" \
 -storepass changeit

I'm also surprised that the usual straight forward approach isn’t working. I went through this same setup last year, and everything worked without any extra effort.

Reasons:
  • Whitelisted phrase (-1): Have you tried
  • RegEx Blacklisted phrase (2.5): Could you share
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
Posted by: Abhinav Sumaan