Greetings,
I wish to confirm whether there exists a configuration limitation in the Clojure online test runner that prevents the use of Java classes, specifically the one mentioned in the title ?
My code executes on Clojure online platforms such as OneCompiler, but not under the Exercism online test runner (no, I do not have a local Clojure installation available).
The offending snippet:
(def +generated-names+ (new java.util.HashSet))
The corresponding test runner output:
----- Error --------------------------------------------------------------------
Type: clojure.lang.ExceptionInfo
Message: Unable to resolve classname: java.util.HashSet
Data: {:type :sci/error, :line 11, :column 1, :file "/mnt/exercism-iteration/src/robot_name.clj", :phase "analysis"}
Location: /mnt/exercism-iteration/src/robot_name.clj:11:24
Phase: analysis
----- Context ------------------------------------------------------------------
7: (:gen-class))
8:
9: (declare make-robot)
10:
11: (def +generated-names+ (new java.util.HashSet))
^--- Unable to resolve classname: java.util.HashSet
12:
I have no problem using other approaches to solve the exercise. I merely want to know why this particular Java interop is not working.
Thank you.