Fork me on GitHub

Hi, not having used lein repl for a few weeks, I’ve forgotten how to include Java classes sourced from lein dependencies. In particular, I have a dependency:

:dependencies [[org.clojure/clojure "1.7.0"]
                 [org.seleniumhq.selenium/selenium-java "2.45.0"]
                 [org.seleniumhq.selenium/selenium-firefox-driver "2.45.0"]])
But fail to import or require it like
user=> (require '[org.openqa.selenium.firefox.FirefoxDriver :as ff-driver])

FileNotFoundException Could not locate 
org/openqa/selenium/firefox/FirefoxDriver__init.class or org/openqa/selenium/firefox/FirefoxDriver.clj on classpath.  clojure.lang.RT.load (
I know about clj-webdriver, I’m just doing a bit of work for a demo tonight about Clojure interop.


@paulspencerwilliams When I had that last time I simply had forgotten to restart the REPL; did you?


@meikemertsch: yeah, repl started after adding the dependency.


I know my problem is a lack of understanding of loading / requiring and how the differ from within .clj ns files and code in the repl


looks like it does - your google fu is great - I’d been searching clojure require selenium etc and was struggling!


I searched 'firefoxdriver in clojure’ simple_smile


well… imports work although using the driver is causing

user=> (def driver (FirefoxDriver.))

CompilerException java.lang.reflect.InvocationTargetException, compiling:(form-init8874946729723677435.clj:1:1) 


it’s a very old version of selenium. Just trying to get that old version.


yeah, copied their code and it fails 😕


java.lang.reflect.InvocationTargetException (NO_SOURCE_FILE:1)


I have working code using selenium in another project. Just not running it from the REPL


Em, unsure whether it was a version thing. It now works with 2.45.0 with their code.


@ian i think if you got from pragprog, if you bought the ebook you get a discount on the paper copy


Yeah, but I already bought the ebook. There's no option for getting just the paper copy with the discount of the bundle, as far as I saw.


I would like to buy the book for the full price but I can't justify it since I do already have a (digital) copy.

Alex Miller (Clojure team)15:10:22

you could contact them via <mailto:[email protected]|su[email protected]> and see if that's possible, not sure


I got a copy of the beta when it was first released,, when i log into pragprog, go to my accounts, it lists it as a coupon for $15 off ... maybe because I got it so early?


pragprog ebooks are not so bad compared to other publishers. I got the kindle version of Land of Lisp and the code is unreadable. Will have to buy the paper version. Since then, I’ve bought all my programming books as paper, except the pragprog books.

Alex Miller (Clojure team)15:10:23

@clojuregeek: I think that's how the beta program works

Alex Miller (Clojure team)15:10:58

you get the e-book for no cost and a coupon to buy the bundle if you want it

Alex Miller (Clojure team)16:10:31

the coupon let's you buy the print book at the reduced price you'd get in the combo, so you can essentially add on the print book later if you want


@alexmiller: cool... i am only and all digital now ... cept I did buy the paper book of Common Lisp when I found it at half price books....


O’Reilly’s and Mannings' ePubs are good as well. I haven’t bought a printed tech book in years.


Most of the tech books I’ve bought this year are printed except for the pragprog books.


O’Reilly books are ok, but I don’t like the topics they cover. Most of them cover a specific technology that in a couple of years is outdated. They are more like manuals.


While the books that cover more fundamentals look terrible in e-format. Case in point, Purely Functional Data Structures, GOOS & Land of Lisp


I rarely buy O’Reilly anymore. Did pick up Living Clojure though, of course.


yeah, I picked up Living Clojure too.


I didn’t bother with the Land of Lisp ePub. I read that one in PDF.


yeah, I wish I had done the same. I’m stuck with the kindle version that is unreadable.


Sad. That’s a great book. F# got me into FP and Land of Lisp got me into, well, Lisp which got me into Clojure.


@alexmiller: thanks for the suggestion, but hopefully I'll be able to pay the full price soon instead. I'd rather support you and Ben fully.


It's interesting to see so many people move away from physical copies. My problem with digital is always that it feels too difficult to progress through the book compared to a physical copy. I think seeing the pages complete pile up on one side "feels" better.


yeah, I feel the same way.


also, reading ebooks doesn’t really fit with the way I read a book.


I normally skim through the chapter first, before I start reading it. This is very hard to do with an ebook.


it is okay for fiction, but not tech books.


I prefer physical books because "see code listing on page X" really bothers me on ebooks


I'd love a reader with vim keybinding though


<count>G C-] C-i C-o


those would be awesome


you just mentioned one of the most frustrating things in ebooks about coding: “see code listing (or diagram) on page X"


roberto: that’s not an ebook then, it’s a „scanned printed book"


as most of them are simple_smile


it’s a long way to hypertext


even if it had a link, it is not helpful


because I want to see the code right beside the text that is talking about the code


in a physical book, even if the code is in the other page, you can see it because you can see two pages at once.


or at least flip really fast between them


roberto: hypertext is not only link to a different page, you could also embed the targeted resource in place simple_smile

Alex Miller (Clojure team)21:10:13

and let you change it and re-run it :)

Alex Miller (Clojure team)21:10:05

I have a gorilla repl version of some of the Cognitect Clojure training materials at if anyone wants to try it :)


@alexmiller: where’s the deploy to heroku / aws / do button? 😛

Alex Miller (Clojure team)21:10:45

gorilla does have a way to live serve each page (although the intra-page links won't work)


pink color is pink

Alex Miller (Clojure team)21:10:28

like that to live serve out of the repo

Alex Miller (Clojure team)21:10:13

I guess that doesn't let you actually run the repl examples, it's read-only


A very nice tool