Clojure REPL from USB drive
I'm trying to learn Clojure at the moment, but off to my parents this weekend. They have a Windows laptop, but I don't want to install anything...so is it possible to run a Clojure REPL solely with fil开发者_如何学JAVAes installed on a USB drive?
The best portable clojure "environment" that I have come across is Lisp Cabinet.
It gives the option of multiple lisp environments, but you can choose to just have a clojure environment. It is a little dificult to discern from the website that it's portable, but the installer gives you the option of installing everything in one folder for a completely portable experience.
Edit: As for a repl, when you launch it, Lisp Cabinet gives you an emacs slime REPL for the environments that you choose (that would probably just be clojure).
Sure, absolutely this will work. If you install both Java and Clojure onto a flash drive, it will work just the same as if you installed it onto a normal hard drive.
As this blog post recommends you can set up a clj.bat
file:
@ECHO OFF
java -cp clojure.jar clojure.lang.Repl
Just keep in mind that your parent's laptop won't have any environment variables set (i.e. PATH), so depending on where everything is located, you will need to tweak it to make sure java
is recognized, and clojure.jar
is on the classpath.
You could also install leiningen on the USB drive. Then call
/path/to/USB/lein.bat repl
Enjoy!
精彩评论