Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Corrected a bug where just having clojure-contrib without the clojure…

… jar was not getting caught by the classpath verifyer for the repl startup.
  • Loading branch information...
commit aca4ff7966f0310ffe9a9893329613207bf8ab3a 1 parent 06ec577
Eric Thor authored
View
8 src/enclojure.plugin.netbeans/src/org/enclojure/ide/nb/editor/repl_tc.clj
@@ -55,13 +55,13 @@
(NotifyDescriptor$Confirmation.
(str
"There did not appear to be both valid clojure and clojure-contrib jars present in the classpath. "
- "Clojure => " (if clojure (format "\"%s\"" clojure) " no reference to a clojure jar found in classpath.")
- (when clojure (if clojure-exists? " valid clojure file." " file not found."))
- "\nClojure-contrib => " (if clojure-contrib
+ "For clojure.jar => " (if clojure (format "\"%s\"" clojure) " no reference to a clojure jar found in classpath.")
+ (when clojure (if clojure-exists? " possibly valid clojure file." " file not found."))
+ "\nFor clojure-contrib.jar => " (if clojure-contrib
(format "\"%s\"" clojure-contrib)
" no reference to a clojure-contrib jar found in classpath.")
(when clojure-contrib (if contrib-exists?
- " valid clojure-contrib file." " file not found."))
+ " passibly valid clojure-contrib file." " file not found."))
"\nThese are both required to start a repl."
"\nFor a project REPL, you can add them as libraries to the project."
"\nFor the stand-alone REPL, go to the Enclojure category in the Netbeans preferences and make sure they are both present in the selected platform."
View
11 src/repl-client/src/org/enclojure/ide/repl/repl_manager.clj
@@ -24,12 +24,15 @@
(logger/ensure-logger)
(defn bad-classpath?
- "Looks for clojure-contrib and clojure in a classpath string. It could actually
-look inside the jars but for now just look for the names."
+ "Looks for clojure-contrib and clojure in a classpath string and makes sure
+the files exist. (Probably should look inside the jars????)"
[classpath]
(let [paths (.split classpath java.io.File/pathSeparator)
- clojure (some #(when (>= (.indexOf % (str File/separator "clojure")) 0) %) paths)
- contrib (some #(when (>= (.indexOf % (str File/separator "clojure-contrib")) 0) %) paths)
+ contrib (some #(when (>= (.indexOf %
+ (str File/separator "clojure-contrib")) 0) %) paths)
+ clojure (some #(when (>= (.indexOf %
+ (str File/separator "clojure")) 0) %)
+ (filter #(not= contrib %) paths))
clojure-exists? (and clojure (.exists (File. clojure)))
contrib-exists? (and contrib (.exists (File. contrib)))]
(when-not (and contrib clojure clojure-exists? contrib-exists?)
Please sign in to comment.
Something went wrong with that request. Please try again.