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 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

Is it possible to specify a Java classpath that includes a JAR file contained
Let's say I have this Hello.scala. object HelloWorld { def main(args: Array[String]) { println(Hello,
I have been using this exact Build.xml file. I had problems in the beginning
All, My classpath has been set to the following folder: CLASSPATH = .;C:\Program Files\Java\jdk1.6.0_21\bin;C:\Program
I have a maven project with a dependency (datanucleus-db4o). This dependency has itself a
Okay. I'm sick of this problem. This has to have an easy fix, I'm
How does the Class-path in the MANIFEST.MF file determine the relative location? 1) Say
What is classpath hell and is/was it really a problem for Java?
How do I locate resources on the classpath in java? Specifically stuff that ends
How do you change the CLASSPATH of a Java process from within the Java

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.