- Install Cljr:
- Download cljr-installer.jar from
http://joyofclojure.com/cljr
or here.
- CD into the directory you' ve downloaded.
- java -jar cljr-installer.jar
- Add $HOME/.cljr/bin to your PATH.
(NOTE: Installer puts the Cljr into $HOME/.cljr).
I disliked having Cljr in my Windows home directory.
Also blanks in home directory (i.e. "Documents and Settings")
made problem in cljr.bat in the /bin folder. So, after running
the DynaFrame example, I moved Cljr environment to my favourite
folder. I will explain how I do in another blog entry
- Download book source code from
https://github.com/joyofclojure/book-source/zipball/master.
- Unzip source zipball into your favourite folder.
There would be 3 folders in your favourite folder.
|--<your-joy-folder>
|-- lib
|-- src
|-- test
- Create new folder classes near those 3 folder.
|--<your-joy-folder>
|-- classes
|-- lib
|-- src
|-- test
- Add folders src and classes to Cljr classpath
In cmd command prompt:
cljr add-classpath src <ENTER>
cljr add-classpath classes <ENTER>
You can display the classpath by using cljr list-classpath
- Setup is now complete !!!
- Download cljr-installer.jar from
http://joyofclojure.com/cljr
or here.
- When you want to run examples
- In cmd command prompt:
cd <your-joy-folder> <ENTER> (i.e. cd into sources root, not /src!)
cljr <ENTER>
- Run the examples in Cljr REPL.
If you want to run gui example:
user=> (use 'joy.gui.socks)
nil
user=> (example-gui)
nil
- In cmd command prompt:
10 Şubat 2012 Cuma
Running Joy of Clojure gui code with Cljr environment
I am Clojure beginner and I' ve begun studying
the book The Joy of Clojure.
It is very good book. As the authors mentioned, it is
not for beginners. So, beginners like me
experiencing some difficulties in running
example source codes. Yesterday, I' ve spent
many hours to install Cljr
environment (developed by David Edgar Liebke)
and to run joy.gui.DynaFrame and joy.gui.socks
example. Here' s my solution:
Kaydol:
Kayıtlar (Atom)