Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8614649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:10:13+00:00 2026-06-12T05:10:13+00:00

I’m trying out clojure on my second day and I don’t understand almost anything

  • 0

I’m trying out clojure on my second day and I don’t understand almost anything yet. I am working with the Programming Clojure 2nd ed. and I am stuck with libraries.

I have Leiningen and have the REPL running. The book first tells the reader to run a simple

(require 'clojure.java.io)

which works just fine (I get a nil). Then it wants to load a file called introduction.clj by running another simple

(require 'examples.introduction)

where I get an error message

FileNotFoundException Could not locate clojure/java/introduction__init.class
or clojure/java/introduction.clj on classpath:   clojure.lang.RT.load (RT.java:432)

I downloaded the introduction.clj file and looked where should I place it. The error and the book says the command will search in my classpath, but I have no idea where or what that is (after 1h of searching and reading I still don’t get it, sorry). I ran a few commands and I had many classpaths listed (from which none contain a clojure/java/io.clj).

So I tried another approach – find the io.clj file on my disk and simply copy the file there and run it with a command

(require 'clojure.java.introduction)

This doesn’t seem to work either. By the way, the io.clj file I found was in “C:\Program Files\clojure\src\clj\clojure\java”. I tried running several other .clj files from the java folder as well from the clojure folder, like javadoc.clj or inspector.clj and all seem to work just fine with the above mentioned command. Only the new file doesn’t seem to load this way.

Any help appreciated 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:10:15+00:00Added an answer on June 12, 2026 at 5:10 am

    Clojure runs on the Java Virtual Machine, so you will need to learn a bit about PATH and CLASSPATH concepts:

    See: http://docs.oracle.com/javase/tutorial/essential/environment/paths.html

    Regarding the error message, the Clojure runtime is expecting to find introduction.clj in the directory clojure\java\example\introduction.clj (not where it really should be – see below).

    The convention for Clojure namespaces is that the last component is the file name, while any previous components are parent directories. So

    clojure.java.introduction
    

    would have to be in the directory (relative to your source “root” or classpath)

    clojure\java\introduction.clj
    

    (The lein REPL automatically adds your source root to the classpath).

    Another concept you need to understand is where the “root” of your source code is located. For Leiningen (the build tool you are using) the default is either “src” or “src/main/clojure” – as documented in the Leiningen sample project file on GitHub).

    Finally, if you get really stuck, it seems the complete project for the book is available on GitHub.

    Looking at the project, I see that you should actually be placing the file under src\examples\introduction.clj

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to select an H1 element which is the second-child in its group
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I don't have much knowledge about the IPv6 protocol, so sorry if the question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.