0

I try to run ClojureScript "hello-world" project on Windows 10 Home 22H2 19045.4529. I follow documentation from https://clojurescript.org/guides/quick-start and get following output:

C:\Users\1\Documents\hello-world>java -cp "cljs.jar;src" cljs.main --compile hello-world.core --repl
Exception in thread "main" java.lang.StackOverflowError
    at clojure.lang.LazySeq.seq(LazySeq.java:51)at clojure.lang.RT.seq(RT.java:531)
    at clojure.core$seq__5387.invokeStatic(core.clj:137)
    at clojure.core$concat$fn__5478.invoke(core.clj:725)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:51)
    at clojure.lang.RT.seq(RT.java:531)
    at clojure.core$seq__5387.invokeStatic(core.clj:137)
    at clojure.core$concat$fn__5478.invoke(core.clj:725)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:51)
    at clojure.lang.RT.seq(RT.java:531)
    ...

JAVA

C:\\Users\\1\\Documents\\hello-world\>java -version 

java version "1.8.0_411"Java(TM) SE Runtime Environment (build 1.8.0_411-b09) 

Java HotSpot(TM) Client VM (build 25.411-b09, mixed mode, sharing)

FOLDER

C:\Users\1\Documents\hello-world>tree /f /a
C:.
|   cljs.jar
|
\---src
    \---hello_world
            core.cljs

version of cljs.jar latest, 1.11.60

core.cljs

(ns hello-world.core)  

(println "Hello world!")

Clojure

C:\Users\1\Documents\hello-world>clojure
Clojure 1.11.3
user=>

Changing structure of application didn't help. (removing hello_world folder)

3
  • 1
    I can't reproduce it on JDK 22. Note that JDK 8 is only supported for Oracle subscribers, the free support has ended years ago so I can't even download it via the official website. Commented Jul 8 at 10:05
  • 1
    Also wasn't able to reproduce it with Eclipse Temurin JDK 8.0.412.8. That StackOverflowError error - are there any more details? Commented Jul 8 at 10:14
  • I installed Java SDK 22 and it helped. I just followed documentation where it is written that you will need Java 8. Thanks!
    – mikeeeeeee
    Commented Jul 8 at 12:40

1 Answer 1

1

I suspect you have the Java JRE installed, whereas Clojure(Script) need the full Java JDK. Not exactly sure how that would lead to a Stack Overflow but try installing a full JDK variant. At least Version 11+, otherwise you'll run into issues a bit later again.

https://adoptium.net/temurin/releases/?os=windows

Version 21 is the current LTS (Long Term Support) Release, so I'd recommend that.

Not the answer you're looking for? Browse other questions tagged or ask your own question.