I'm attempting to translate some exercises from the book Introduction to Computer Simulation Methods <http://sip.clarku.edu/> from Java to Clojure.
First, I packaged up the opensourcephysics source code<http://www.opensourcephysics.org/document/ServeFile.cfm?ID=7147&DocID=2267#Doc2267>and submitted it to clojars <https://clojars.org/org.clojars.dwwoelfel/osp>. The source is on Github <https://github.com/dwwoelfel/opensourcephysics>. Then I added it as a dependency to my project. Unfortunately, if I try to import a class from opensourcephysics, I get java.lang.ClassNotFoundException. I can't do lein compile without this error: > Caused by: java.lang.ClassNotFoundException: > org.opensourcephysics.controls.AbstractSimulation > at java.net.URLClassLoader$1.run(Unknown Source) > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at > clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at clojure.lang.RT.classForName(RT.java:2039) > at clojure.core$the_class.invoke(genclass.clj:99) > at clojure.core$generate_class.invoke(genclass.clj:119) > at clojure.core$gen_class.doInvoke(genclass.clj:622) > at clojure.lang.RestFn.invoke(RestFn.java:1124) > at clojure.lang.Var.invoke(Var.java:465) > at clojure.lang.AFn.applyToHelper(AFn.java:248) > at clojure.lang.Var.applyTo(Var.java:532) > at clojure.lang.Compiler.macroexpand1(Compiler.java:6366) > at clojure.lang.Compiler.analyzeSeq(Compiler.java:6441) > ... 45 more It appears that I've declared dependencies incorrectly, or packaged up the opensourcephysics code incorrectly. My project.clj looks like (defproject fractal "0.1.0-SNAPSHOT" > :description "FIXME: write description" > :url "http://example.com/FIXME" > ;; Same license as opensourcephysics > :license {:name "GNU General Public License" > :url "http://www.gnu.org/copyleft/gpl.html"} > :dependencies [[org.clojure/clojure "1.4.0"] > [org.clojars.dwwoelfel/osp "2.3"]] > :main fractal.fractalapp) the fractal.fractalapp namespace declaration is: (ns fractal.fractalapp > (:import [org.opensourcephysics.frames PlotFrame] > [org.opensourcephysics.controls SimulationControl]) > (:gen-class :name "org.opensourcephysics.controls.FractalApp" > :extends org.opensourcephysics.controls.AbstractSimulation)) The source is available on Github: https://github.com/dwwoelfel/fractal I'm not sure if it is a problem with the way I declare dependencies or with the way I packed up the opensourcephysics code. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en