Nightcode icon indicating copy to clipboard operation
Nightcode copied to clipboard

MacOS High Sierra - Nightcode can't access Java

Open gautamz opened this issue 7 years ago • 5 comments

I had installed Java manually into /usr/local and have it in my path. I am able to run both Java and Clojure in cli. However when I run Nightcode it is not able to start the REPL and states "No Java runtime present, requesting install."

Is there a specific configuration option to allow Nightcode to access my Java install?

gautamz avatar Jul 17 '18 09:07 gautamz

Are you running nightcode as a jar, or did you use an installer? Also, by "manually" do you mean you extracted java yourself, or did you use a package manager? I've definitely had issues with the path before, especially when not using a normal java installer.

oakes avatar Jul 17 '18 09:07 oakes

I used the .dmg installer for MacOS to get the app. I have extracted Java manually and installed it in a folder of my choosing. I tried running the jar. When I double click the .jar app it doesn't run, saying Java needs to be installed. When I run the .jar app from cli it runs fine.

gautamz avatar Jul 17 '18 12:07 gautamz

So the Nightcode jar file runs from the terminal, but not from the Finder? And when you run Nightcode.app (rather than the jar), it runs but the REPL does not? One thing worth trying is setting the JAVA_HOME environment variable. Not sure if it affects things but perhaps it is what the system looks for when not running via the terminal.

oakes avatar Jul 17 '18 13:07 oakes

I have set Java_Home, but I think it seems MacOS expects Java to be installed in /Library. A symlink should help fix this, once I can figure out where it needs to be placed.

gautamz avatar Jul 17 '18 16:07 gautamz

http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

based2 avatar Sep 16 '18 15:09 based2