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

  • Home
  • SEARCH
  • 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 971775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:01:00+00:00 2026-05-16T03:01:00+00:00

CLASSPATH has the /Users/smcho/Desktop/clojure as one of its path, and this directory has the

  • 0

CLASSPATH has the “/Users/smcho/Desktop/clojure” as one of its path, and this directory has the file hello.clj.

Running clojure, and running (require ‘hello) give this error message.

java.io.FileNotFoundException: Could not locate hello__init.class or hello.clj on classpath:  (NO_SOURCE_FILE:0)

When I change directory to “/Users/…/clojure”, and run the same (require ‘hello), there’s no problem. The . is on the CLASSPATH.

Running

java -cp /Users/smcho/bin/jar/clojure.jar:/Users/smcho/Desktop/clojure clojure.lang.Repl

also works.

Why clojure can’t find the source on the CLASSPATH?

  • 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-05-16T03:01:00+00:00Added an answer on May 16, 2026 at 3:01 am

    Like Alex mentioned, if you start java with the -cp argument, then the CLASSPATH environment is not referenced. So, instead of

    java -cp /Users/smcho/bin/jar/clojure.jar clojure.lang.Repl
    

    use

    java -cp /Users/smcho/bin/jar/clojure.jar:$CLASSPATH clojure.lang.Repl
    

    You can examine your java classpath from within the Clojure repl:

    (doseq [p (.getURLs (java.lang.ClassLoader/getSystemClassLoader))] (println (.getPath p)))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an eclipse's .classpath file that looks like this: <?xml version=1.0 encoding=UTF-8?> <classpath>
I want my classpath to be set via a batch file. I'm working on
You hear terms like classpath, build path, etc. all the time, referencing a list
java -Djava.library.path=../lib -classpath ../lib/wrappertest.jar:../lib/wrapper.jar:Service.jar:../lib/mysql-connector-java-3.0.17-ga-bin.jar -Dwrapper.key=Ksxtsmvr7iAmVJ-T -Dwrapper.port=32001 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=1731 -Dwrapper.version=3.3.0 -Dwrapper.native_library=wrapper -Dwrapper.service=TRUE -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1
I have a jar on the classpath which contains a hibernate.properties. This causes problems
Let's say I have this Hello.scala. object HelloWorld { def main(args: Array[String]) { println(Hello,
This problem has been bugging me for a while. I have to load a
I'm running a simple Java program with below directory structure: MyProject (A project in
One application I'm working on has several URLs and other information that is instance
I have an application with a configuration file which has a lots of environment-specific

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.