scala를 이용한 두가지 방법이 있다.
그냥 scala를 설치하거나 scala typesafe activator를 설치하는 것이다.
1번 그냥 설치
$ brew install scala
2번 typesafe activator 이용
아니면, 다운로드 싸이트(http://www.scala-lang.org/download/)에서 Typesafe Activator를 다운받는다.
zip을 풀어 $ ./activator ui 를 실행한다.
현재(2014.11.28)는 activator 1.2.0 기반이며, scala 2.10.2 이다.
(참고로.. scala 언어의 특징이 계속 변경되기 때문에 항상 버전을 신경써야 한다. )
사용방법은 https://typesafe.com/platform/getstarted 에 있다.
웹에서 간단하게 테스트해볼 수 있으며, ide에 연동할 수 있다.
3. scala ide
eclipse, intellij idea에서 scala 플러그인를 설치한다.
- scala 플러그인 설치
- File-New Project-SBT-project name 만들기
- 만약 src/main/scala 디렉토리가 안생겼으면, 해당 디렉토리를 만들고 마우스 오른쪽 버튼을 눌러 “Mark directory as..”-Sources Root 로 설정
- 로컬 scala, jdk 설정
(참조 : http://stackoverflow.com/questions/25201365/whats-the-reason-for-errorcannot-determine-java-vm-executable-in-selected-jdk)
- 우측 탭의 SBT 플러그인의 SBT tasks를 실행후의 상단의 refresh 버튼을 누른다. (다음에도 dependency 추가하고 나서 lib 다운로드를 할 때에도 유용하다.)
4. play2 - scala (with intellij) 이용
(현재 이 방식 이용중)
(따라해도 무의미하다.. sorm은 더이상 유지보수 되지 않고, 에러 발생해서 play 2.1에만 쓰고, 상위 버전에서는 더이상 쓰지 못하는 예제이다. http://stackoverflow.com/questions/26213733/sorm-h2-db-for-play-framework-scala-nosuchmethoderror)
'scala' 카테고리의 다른 글
play2 (scala) jmx 사용하기 (0) | 2014.12.22 |
---|---|
[scala] 생성자 만들기 - not enough arguments for constructor DefaultConsumer (0) | 2014.12.09 |
scala (activator) 사용 팁 (0) | 2014.12.09 |
scala-sbt 주의할 점 - 개행 문자!! (0) | 2014.12.09 |
bad symbolic reference to scala.ScalaObject encountered in class file 'Logging.class' (0) | 2014.12.02 |