Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Feature Forums
  3. - Uncategorised posts -
  4. Clojure Lein - Changing Root Project Folder?

Clojure Lein - Changing Root Project Folder?

Scheduled Pinned Locked Moved - Uncategorised posts -
tutorialjavahelpquestionlearning
2 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dominick Marciano
    wrote on last edited by
    #1

    I'm starting to learn Clojure using using Lein, however I can't see to get lein to work properly. I used the Windows installer and everything seemed to work fine; no error message and all code I enter in REPL works fine. However when I try to run an example from the book I reading ("Programming Clojure" by Stuart Halloway) I get an error message. Specifically the book has a section on using libraries where it shows how to use an example from the source code provided. It shows to enter (require 'examples.introduction). The error message I get is: FileNotFoundException Could not locate examples/introduction__init.class or examples/introduction.clj on classpath: clojure.lang.RT.load (RT.java:443) I know that the introduction.clj file exist at ../Desktop/Programming/code/src/examples/introduction.clj and there is also a project.clj file that exist at ../Desktop/Programming/code/project.clj From trying to provide the path in different formats, and what I've read online, it seems like I need to set the directory of my project for lein to find the ../examples/introduction.clj, but I haven't found how to do this. I've read the tutorial on lein website and have tried going through it step by step but still nothing. Can anyone provide guidance on how I can get lein to find the file that I specify using the (require)? This is the first day I'm using Clojure. Thanks in advance.

    L 1 Reply Last reply
    0
    • D Dominick Marciano

      I'm starting to learn Clojure using using Lein, however I can't see to get lein to work properly. I used the Windows installer and everything seemed to work fine; no error message and all code I enter in REPL works fine. However when I try to run an example from the book I reading ("Programming Clojure" by Stuart Halloway) I get an error message. Specifically the book has a section on using libraries where it shows how to use an example from the source code provided. It shows to enter (require 'examples.introduction). The error message I get is: FileNotFoundException Could not locate examples/introduction__init.class or examples/introduction.clj on classpath: clojure.lang.RT.load (RT.java:443) I know that the introduction.clj file exist at ../Desktop/Programming/code/src/examples/introduction.clj and there is also a project.clj file that exist at ../Desktop/Programming/code/project.clj From trying to provide the path in different formats, and what I've read online, it seems like I need to set the directory of my project for lein to find the ../examples/introduction.clj, but I haven't found how to do this. I've read the tutorial on lein website and have tried going through it step by step but still nothing. Can anyone provide guidance on how I can get lein to find the file that I specify using the (require)? This is the first day I'm using Clojure. Thanks in advance.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Set your classpath variable to include the full path of the directory, e.g. C:/Desktop/Programming/code/src.

      Use the best guess

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups