Fork me on GitHub
#cursive
<
2023-05-22
>
yonatanel07:05:50

Hi, There’s the pesky Suppressed exit REPL problem that comes up from time to time here and in github. In my case I’m using a macbook M1 and installed java through https://sdkman.io/. The problem happens on mixed clj/java projects and the only thing that solved it (so far) for me was installing java with brew install openjdk@17 in addition to the sdkman installation. I’d like to zero-in on a better solution, for example configure intellij/cursive correctly instead of having two completely different java installations. Some intellij logs that pointed in the right direction are:

2023-05-21 19:07:15,066 [2104693]   INFO - STDERR - The operation couldn't be completed. Unable to locate a Java Runtime.
2023-05-21 19:07:15,066 [2104693]   INFO - STDERR - Please visit  for information on installing Java.
2023-05-21 19:07:15,066 [2104693]   INFO - STDERR - 
2023-05-21 19:07:15,072 [2104699]   WARN - #c.s.IndicatorBridge - Exit called in Leiningen:
java.lang.RuntimeException: null
 at cursive.leiningen.project$add_standard_hooks_BANG_$fn__2318$fn__2319.invoke (project.clj:514)
...
2023-05-21 19:07:15,073 [2104700]   INFO - #c.i.e.r.ExecutionUtil - Error running 'myproject':<br>Error executing Leiningen configuration.
com.intellij.execution.ExecutionException: Error executing Leiningen configuration.
	at cursive.repl.runner.LocalConfiguration.createLeinParameters(ReplRunConfigurations.kt:516)

cfleming09:05:28

So this is something in Leiningen that’s trying to call System/exit, or the lein internal wrapper of it. Which lein plugins do you use in this project?

cfleming09:05:14

It looks like the ... there is a redacted stack trace, can you send that?

yonatanel05:05:52

Just updating with a better solution thanks to @U0567Q30W: add :java-cmd to project.clj (or ~/.lein/profiles.clj(under :user)):

:java-cmd "/Users/<myuser>/.sdkman/candidates/java/current/bin/java"

👍 2
Steffen Glückselig10:05:29

Hi - I am behind a firewall and cannot download clojuredocs via cursive. Is there a way to use clojuredocs-support by manually downloading https://clojuredocs.org/clojuredocs-export.json? I think that used to work quite some time ago. Where is clojuredocs-export.json currently placed by cursive?

staypufd17:06:48

@U0567Q30W I would like to know how to do this as well. Is there a way?

cfleming21:06:04

Hi, sorry for the delay replying to this. You want the system folder from this page: https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#system-directory. So in my case on my Mac, it’s ~/Library/Caches/JetBrains/IntelliJIdea2023.2.