본문 바로가기

JAVA

이클립스 설정 정리

이클립스에서 설정하는것들을 정리해 놓으셨네요.

출처 : http://suicide102.egloos.com/2407763

-----------------------------이클립스 기본---------------------------------

1. workspace(디렉토리)--> project(디렉토리)
--> 패키지(디렉토리) --> src(.java 파일)

2. 설정

1) windows -->preferences--> java--> compilor: 버젼수정
2) windows -->preferences--> general--> appearance
--> colors and fonts--> java editor text font(또는 basic)
3) general--> editors--> text editors--> showline number

==============================이클립스 버전 설정=================================

1. 이클립스 전체 버젼
1) window-->프리퍼런스-->Java-->Compiler에서 버젼 설정
2) window--> preferences-->java-->Installed JRES에
사용할 버전의 jdk는 모~두 add한다.
3) 기본적으로 사용할 jdk(jre) 체크


2. 프로젝트별로 각기 버전 설정
1) 프로젝트선택--> properties --> Java Complier 에서 사용할 자바 버전 설정
2) 프로젝트선택--> properties --> javaBuildPath --> libraries탭 --> add Library
--> JRE System Library --> Alternate JRE 선택
--> 기본적으로 add되어 있는 jdk(jre)중에서 사용할 jdk(jre)로 변경

------------------------------------encoding 바꾸기-----------------------------
★ 중요: <%@ page contentType="text/html; charset=MS949" %> 의 charset 과
해당 페이지의 저장형식(인코딩)을 꼭!!확인할 것!!!

1. 전체 인코딩
window--> 프리퍼런스--> General > Workspace, content Type -->해당 확장자 선택
--> default encoding 입력변경 (예: euc-kr)

또는(정확히 위와 어떤 차이의 작용을 하는지 아직 모름..


이클립스 올인원의 경우
window--> 프리퍼런스--> Web and XML()에서 각각 파일의 인코딩 설정

마이 이클립스의 경우
window--> 프리퍼런스--> MyEclipse--> Files and Editors 각각 파일의 인코딩 설정

2. 해당 페이지 인코딩
해당페이지 선택 --> 프리퍼티스 --> text file encoding에서
default를 헤제하고 따로 지정한다.

----------class file has wrong version 49.0, should be 48.0class file has wrong version 49.0, should be 48.0 에러-----------------

이클립스안에서 서버를 돌리는 jre버전과
개발 하는jdk와 버전이 맞지 않기 때문에...버전을 모두 맞춰준다!

---------------------------plugin이 적용안될 때...----------------------

도스창에서 eclipse -clean


---------------------------class파일을 못찾을때-------------------------
preperence-->Java Build Path의 Libraries에다가 jar파일 또는 Library(jdk1.4등)를 추가한다.


-----------------------------jar파일 만들기------------------------------

1. 패키지를 만든다.
2. export한다.
3. 설정(JAR File Specification)
- 체크 박스로 class 파일만 포함시킬지, 특정 폴더내의 모든 파일을 포함시킬지 등을 설정
- jar파일을 생성할 위치 설정

-------------------------컴파일된 class파일의 위치 지정해주기--------------------
1. 해당 workspace클릭
2. properties 에서 Java Build Path에서
3. source 탭
- Source folders on build path: java파일이 있는 곳
- Default output folder: class파일이 컴파일 되는 곳 설정

=====================마이이클립스 페이지마다 에디터 설정하기===================

window--> Preferences--> Editors --> File Associations
해당 확장자 선택 후 사용할 에디터를 'default'로 선택

=====================이클립스 플러그인 셋팅(asp, _javascript-x 사용편하게)=================
1. SVN plug-in 설치

help--> software updates--> Fine and install --> Search for new features to install
--> next --> New Remote Site

name: Subversive

URL: http://www.polarion.org/projects/subversive/download/update-site

설치

2. EclipseColorer 설치(ASP구문 강조해줌)
name: EclipseColorer
URL: httpL..colorer.sf.net/eclipsecolorer

설치 후

window--> Preferences--> Editors --> File Associations에서
.asp의 editor를 Colorere XML editor를 default로 선택

3. Aptana 플러그인 설치(_javascript-x 작성을 편하게 해줌)
name: Aptana
URL: http://update.aptana.com/install/3.2

-->주의!! 이클립습 3.2버전이어야 함!
마이이클립스나 그 외 버전은 plug인 설치 후 에러나서
plug인 삭제했슴 ㅡ,,ㅡ

설치

===========================이클립스 플러그인 삭제=======================

help--> software updates--> Manage Configuration에서

관련 플러그인 선택 후 마우스 오른쪽 uninstall

=============================eclips로 톰캣 셋팅==============================

1. tomcat플로그인 설치

2. window--> Preferences

1) Tomcat클릭 -->version 및 아파치 톰캣이 깔린 위치 설정
--> Server.xml로 설정
2) JVM Settings -->ClassPath에 Jar/Zip클릭 후
common\lib\servlet-api.jar 설정
jre버전 설정

3) advanced-->Tomcat base에도 역시 톰캣이 깔린 위치 설정
4) Tomcat Manager App에서 포트번호 설정

3. 윈도우-->프리퍼런스-->서버--> 인스톨드런타임--> add-->아파치(버전 맞추고)
(안보일시 download server adaptar로 필요한 server 다운)

4.file-->new-->project-->web-->Dynamic web project-->targetruntime을
아파치로 , configuration은 custom으로

=============================마이이클립스로 톰캣 셋팅==============================

1. windows--> Preferences --> MyEclipse --> Application servers
--> Tomcat 설정 --> 사용할 버전 선택 후

2. Disable를 Enable로 바꾸고

3. Tomcat Home Directory에 톰캣이 깔린 위치 설정
예) C:\apache-tomcat-5.5.26

4. JDK 선택 후 --> (windows->preferences->java->installed JRES에서 add한 jdk중)
사용할 jdk 설정

5. new --> project --> webProject를 만들고

6. 톰캣 서버를 돌릴 시는

위에 도구툴중에 run/stop/restart MyEclips servers 클릭 --> tomcat스타트

---------------------------이클립스에서 웹로직 돌리기------------------------

★ 단순히 돌리기

1. javaProject 생성 후 그 프로젝트의 properties 클릭
2. java build path의 libraries에 다가
j2ee.jar파일을 Add External JARS함


1. http://www.eclipse.org/downloads/download.php?file=/webtools/downloads/drops/R2.0/R-2.0.1-20070926042742/wtp-all-in-one-sdk-R-2.0.1-20070926042742-win32.zip
에서 wtp 올인원을 다운받는다.

2. https://eclipse-plugin.projects.dev2dev.bea.com에서
com.bea.weblogic.eclipse-2.0.0.zip을 다운받는다.

3. 이클립스가 설치된 폴더에 압축을 푼다.

4. 환경변수에 jdk버전을 1.5이상을 설정한다.(그래야지만 plugin이 적용됨)

5. window-->프리퍼런스-->weblogic--> add

6. general탭에서
weblogic
weblogic Server 8.x
C:\bea
C:\bea\weblogic81
mydomain
C:\bea\user_projects\domains\mydomain
myserver
127.0.0.1
7001
7002
weblogic
************
작성

7. runtime 탭에서 1.4버전으로 맞춰줌

8. window->showviews->others->weblogic 서비스 추가

9. 윈도우-->프리퍼런스-->서버--> 인스톨드런타임--> add-->bea 8.1
(안보일시 download server adaptar로 필요한 server 다운)

10 . file-->new-->project-->web-->Dynamic web project-->targetruntime을
웹로직 8.1로 하고 프로젝트 생성및 작업
configuration은 custom으로

11. 아래 탭에서 server선택-->오른쪽버튼-->weblogic 8.1서버-->next-->설정
-->좌측 프로젝트 이름선택--> add

12. 지구본 클릭-->http://127.0.0.1:7001/프로젝트명/파일명

13. web-inf안의 class폴더는 bulid로 import

14. web-inf의 내용은 webContent안의 web-inf로 import

15. java파일은 java Resources:src 폴더로 import

16. 웹로직 console창에서 application생성 시 경로를
이클립스의 workspace로 맞추고 생성

=============================마이이클립스로 웹로직 셋팅==============================

1. windows--> Preferences --> MyEclipse --> Application servers
--> weblogic 설정 --> 사용할 버전 선택 후

2. Disable를 Enable로 바꾸고

3. Bea Home Directory에 bea가 깔린 위치 설정

예) C:\bea
그러면 나머지는 자동으로 맞춰진다.

4. username/password 설정 후

4. JDK 선택 후 --> (windows->preferences->java->installed JRES에서 add한 jdk중)
사용할 jdk 설정

5. new --> project --> webProject를 만들고

6. 웹로직 서버를 돌릴 시는
위에 도구툴중에 run/stop/restart MyEclips servers 클릭 --> weblogic스타트

-----------------------------이클립스 workspace설정-----------------------

%eclipse%\configuration\.settings\org.eclipse.ui.ide.prefs
파일의 RECENT_WORKSPACES 의 값을 수정하면 된다..

★ ctrl+클릭 --> 해당 클래스로 이동

============================CVS 서버(형상관리 툴) 사용하기=============================
- window--> show view--> Navigator
- 왼쪽탭에 이동
- servers--> start

★ CVS 업로드 시키기 작업수정시, 다른사람이 작업 수정후(동기화)
- window--> show view--> synchronize
- Navigator 창에서
1) 파일 또는 상위폴더를 Refresh시킨다.
2) 파일 또는 상위폴더를 synchronize시킨다.(Team-->syschronize)

- Synchronize 창에서 incoming 하기-->update
- Synchronize 창에서 outgoing 하기-->commit
- Synchronize 창에서 CVS에 있는걸 local(내 컴퓨터)로 재 업로드(롤백)하기
--> overide and update

★ 작동이 잘 안될경우
- window--> show view--> others--> CVS Repositories에서 수정후 재서버 올린다.

★ 버젼 비교
- 파일선택-->team--> show history--> Compare Current with...

'JAVA' 카테고리의 다른 글

[펌] log4j.properties 설정  (0) 2012.03.27
이클립스에서 Spring + iBatis + Oracle 로 화면 출력하기  (0) 2012.03.22
자바의 스마트카드 이론  (0) 2012.02.20
iBatis 와 spring 연동  (0) 2012.02.17
java framework 링크  (0) 2011.06.30