2

In my code, I have: (ns Test.core (:require clojure.contrib.sql) )

The error statement is the following: FileNotFoundException Could not locate clojure/contrib/sql__init.class or clojure/contrib/sql.clj on classpath: clojure.lang.RT.load (RT.java:443)

How do I fix this? Please give very detailed step by step instructions to doing this. I know there are other questions on this before but I'm unable to comment to ask and I can't exactly follow the instructions bc I'm new to eclipse manipulating files in general.

Please help.

user3745942
  • 193
  • 1
  • 2
  • 7
  • 1
    For one, clojure.contrib.sql is old and deprecated. Now it's called java.jdbc. You need to add [org.clojure/java.jdbc "0.3.3"] to your dependencies in project.clj. – Diego Basch Jun 21 '14 at 21:17

1 Answers1

0

In order for a :require to work successfully the relevant .jar file needs to be available on the Java classpath.

You can set this up manually, but typically it is better to add the dependency using either Leiningen (project.clj) or Maven (pom.xml) - either of which will automatically download and set up the dependencies for you.

mikera
  • 105,238
  • 25
  • 256
  • 415