工欲善其事,必先利其器之—MAC下搭建clojure的开发环境
程序员文章站
2022-07-14 14:45:18
...
前置环境
安装JDK
安装clojure sdk
尝试使用homebew来安装clojure SDK
brew install clojure
[email protected] notes$ brew install clojure
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
docfx
==> Downloading https://download.clojure.org/install/clojure-tools-1.9.0.381.tar.gz
curl: (35) Server aborted the SSL handshake
Error: Failed to download resource "clojure"
Download failed: https://download.clojure.org/install/clojure-tools-1.9.0.381.tar.gz
网络有问题,安装失败,那就下载源码并编译吧
如下是网官的指引
git clone https://github.com/clojure/clojure.git
cd clojure
./antsetup.sh
# 编译clojure SDK
ant local
clone源码后,执行antsetup.sh遇到如下问题(代码cloen的目录在/Users/luogw/dev_tool/clojure)
[email protected] clojure$ ./antsetup.sh
./antsetup.sh: line 3: mvn: command not found
cat: maven-classpath: No such file or directory
cat: maven-classpath: No such file or directory
Wrote maven-classpath.properties for standalone ant use
出错提示没有安装mvn
安装mvn还有ant(注:后面编译clojure时需要ant的!)
brew install maven
brew install ant
编译成功后,目录下有clojure.jar
在.bash_profile里添加如下配置
# for clojure
alias start_clojure='java -jar /Users/luogw/dev_tool/clojure/clojure.jar'
命令行的开发环境
进入clojure 的REPL交互模式(运行前面添加的start_clojure命令 ),直接写clojure脚本
[email protected]-MacBook-Pro temp$ source ~/.bash_profile
[email protected]-MacBook-Pro temp$ start_clojure
Clojure 1.10.0-master-SNAPSHOT
user=> println "hello, clojure"
#object[clojure.core$println 0x2ef14fe "[email protected]"]
"hello, clojure"
user=>
IDE下的开发环境
IDEA的开发环境
TODO
插件安装
创建工程
编码运行
交互式RELP模式
在线的编译运行环境
https://repl.it/repls/BlueBountifulOpposites
参考资料
推荐阅读
-
工欲善其事,必先利其器之—MAC下搭建clojure的开发环境
-
工欲善其事,必先利其器之—搭建Android(apk)的反编译环境
-
MAC下Android的Eclipse开发环境的搭建
-
MAC下Android的Eclipse开发环境的搭建
-
zend-MAC 下用MAMP搭建的PHP开发环境安装ZendGuardLoader不成功,请大神帮忙?
-
工欲善其事,必先利其器之—MAC下搭建scala的开发环境
-
工欲善其事,必先利其器之—MAC下搭建groovy的开发环境
-
LNMP开发环境在Mac OS下搭建的步骤详解
-
LNMP开发环境在Mac OS下搭建的步骤详解
-
zend-MAC 下用MAMP搭建的PHP开发环境安装ZendGuardLoader不成功,请大神帮忙?