博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
工欲善其事,必先利其器之—MAC下搭建clojure的开发环境
阅读量:4030 次
发布时间:2019-05-24

本文共 1512 字,大约阅读时间需要 5 分钟。

前置环境

安装JDK

安装clojure sdk

尝试使用homebew来安装clojure SDK

brew install clojure
luogw@luogw-MacBook-Pro notes$ brew install clojureUpdating Homebrew...==> Auto-updated Homebrew!Updated 1 tap (homebrew/core).==> Updated Formulaedocfx==> Downloading https://download.clojure.org/install/clojure-tools-1.9.0.381.tar.gzcurl: (35) Server aborted the SSL handshakeError: 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.gitcd clojure./antsetup.sh# 编译clojure SDKant local

clone源码后,执行antsetup.sh遇到如下问题(代码cloen的目录在/Users/luogw/dev_tool/clojure)

luogw@luogw-MacBook-Pro clojure$ ./antsetup.sh./antsetup.sh: line 3: mvn: command not foundcat: maven-classpath: No such file or directorycat: maven-classpath: No such file or directoryWrote maven-classpath.properties for standalone ant use

出错提示没有安装mvn

安装mvn还有ant(注:后面编译clojure时需要ant的!)

brew install maven brew install ant

编译成功后,目录下有clojure.jar

在.bash_profile里添加如下配置

# for clojurealias start_clojure='java -jar /Users/luogw/dev_tool/clojure/clojure.jar'

命令行的开发环境

进入clojure 的REPL交互模式(运行前面添加的start_clojure命令 ),直接写clojure脚本

luogw@luogw-MacBook-Pro temp$ source  ~/.bash_profileluogw@luogw-MacBook-Pro temp$ start_clojureClojure 1.10.0-master-SNAPSHOTuser=> println "hello, clojure"#object[clojure.core$println 0x2ef14fe "clojure.core$println@2ef14fe"]"hello, clojure"user=>

IDE下的开发环境

IDEA的开发环境

TODO

插件安装

创建工程

编码运行

交互式RELP模式

在线的编译运行环境

参考资料

转载地址:http://xxmbi.baihongyu.com/

你可能感兴趣的文章
[CCF BY C++]2017-12 游戏
查看>>
如何打开ipynb文件
查看>>
[Leetcode BY python ]190. Reverse Bits
查看>>
面试---刷牛客算法题
查看>>
Android下调用收发短信邮件等(转载)
查看>>
Android中电池信息(Battery information)的取得
查看>>
SVN客户端命令详解
查看>>
Android/Linux 内存监视
查看>>
Linux系统信息查看
查看>>
用find命令查找最近修改过的文件
查看>>
Android2.1消息应用(Messaging)源码学习笔记
查看>>
在android上运行native可执行程序
查看>>
Phone双模修改涉及文件列表
查看>>
android UI小知识点
查看>>
Android之TelephonyManager类的方法详解
查看>>
android raw读取超过1M文件的方法
查看>>
ubuntu下SVN服务器安装配置
查看>>
MPMoviePlayerViewController和MPMoviePlayerController的使用
查看>>
CocoaPods实践之制作篇
查看>>
[Mac]Mac 操作系统 常见技巧
查看>>