Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ClassNotFoundException with imported Interface
We start with an interface specification, a snippet of which is this
(ns ie4clj.api)
(definterface Inferrable
(^boolean eval [])
(^boolean evalMembers [members])
We then use that interface in a test, a snippet of which is this
(ns ie4clj.Tests
(:import (ie4clj.api Inferrable)))
(defn SimpleTrue
Inferrable <<<<<<<
(defn eval [] true)))
When that use had problems, the inteliij IDE added the import statement, so I assume that's how to use it
Now, in another file, a snippet of which is this:
(ns ie4clj.AndList
(:import (ie4clj.api Inferrable))
(defn AndList
(defn evalMembers [members]
I see the error message
Syntax error (ClassNotFoundException) compiling at (ie4clj/AndList.clj:1:1).
A question is this: why does the import work in the test file but not in the AndList file?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment