Skip to content

Tutorial : eclipse project setting & debugging [Korean]

lonslonz edited this page Apr 5, 2013 · 7 revisions

Prepare

eclipse 환경설정이 되면 쉽게 Cask 기반 구현, 디버깅이 가능함 eclipse에 ant, ivy plugin이 필요

Download Cask build template

Create new eclipse project

  • File - new - Java Project
  • location에 unzip 한 경로를 지정
  • Project - properties
  • Java Settings 화면에서 default output folder를 bin에서 output으로 변경 - Finish

dir structure

  • 작업이 끝나면 다음과 같은 구조가 됨

dir structure

  • eclipse 상에서 build.xml에 대해 ant resolve를 수행

dir structure

  • project refresh
  • project properties - java bulid path - libraries - add jar - add all in lib
  • add class folder - add conf dir
  • order and export tab - conf dir을 src 다음으로 올림

dir structure

ant package를 수행해 봄. compile 이 잘 되면 완료

Debug

  • Run - Debug Configurations - Java Application - New
  • Main class : Cask

dir structure

  • Arguments tab에서 Program arguments : start로 지정

  • VM arguments :

    -Dcom.sun.management.jmxremote

    -Dcom.sun.management.jmxremote.port=8998

    -Dcom.sun.management.jmxremote.ssl=false

    -Dcom.sun.management.jmxremote.authenticate=false

    -Dcom.sun.management.jmxremote.local.only=fale

    -Dserver.home=D:\git\clone\cask_build-master

    -XX:+UseConcMarkSweepGC

  • server.home 변수를 실제 복사한 directory로 설정

dir structure

  • apply

디버그를 수행해보면 console에 다음과 같이 표시됨.

dir structure

서버가 잘 수행되었는지 웹 브라우저에서 http request를 날려봄.

dir structure

정상 수행일 경우 예제 서비스가 결과를 리턴

dir structure