programing

Java Eclipse의 간단한 설치 얻기

nasanasas 2020. 12. 1. 08:08
반응형

Java Eclipse의 간단한 설치 얻기


또 다른 어리석은 일식 문제를 다루면서 가능한 한 가장 가볍고 최소한의 이클립스 설치를 시도하고 싶습니다.

명확하게 말하면 두 가지에 대해 이클립스를 사용합니다.

  • 자바 편집
  • 자바 디버깅

다른 모든 작업은 Emacs / Zsh를 통해 수행합니다 (JSP / XML / JS 편집, 파일 관리, SVN 체크인 등). 이 작업을 효율적으로 수행하거나 신뢰할 수있는 작업을 수행하기 위해 Eclipse에서 작업하는 측면을 찾지 못했기 때문에 이와 관련된 플러그인을 원하지 않습니다.

eclipse.org 사이트에서 이것은 그들이 가지고있는 eclipse의 가장 가벼운 설치이며, 나는 그런 것 (Bugzilla, Mylyn, CVS xml_ui)을 원하지 않으며 실제로 내가 수행하더라도 각각에 문제가있었습니다 사용하지 마십시오.

그래서 얻을 수있는 최소한의 빌드는 무엇입니까?

  1. SVN 메타 데이터 무시
  2. 모든 기능을 갖춘 편집기 (지능형 및 유형 찾기) 포함
  3. 모든 기능을 갖춘 디버거 (표준 Eclipse / JDK) 포함

추가 플러그인, 플랫폼 또는 다른 플랫폼과의 "통합"이 없습니다. 특히 다음과 관련된 플러그인을 다루고 싶지 않습니다.

Maven, JSP 유효성 검사, 자바 스크립트 편집 또는 유효성 검사, CVS 또는 SVN, Mylyn, Spring 또는 Hibernate "네이처", 번들 Tomcat / GlassFish / etc와 같은 앱 서버, J2EE 도구 또는 이와 유사한 것.

나는 주로 Spring / Hibernate / web-mvc 앱을 사용하고, 우아하게 처리하는 Eclipse 플러그인을 다루지 않았고, 내 자신의 도구 세트로 효과적으로 작업 할 수 있지만 Eclipse 확장은 방해가 될 뿐이다.

나는 Ganymede, MyEclipse (최대 7.5) 및 Spring-SourceTools의 최신 버전까지 일반 이클립스로 작업했으며 모두 버그가 많은 쓸모없는 플러그인으로 안장되어 있음을 발견했습니다 (조합은 항상 다릅니다).

NetBeans / Intellij로 전환하는 것은 옵션이 아니며, 제 팀원은 SVN 제어 .class / .project 파일을 사용하므로 Eclipse 여야합니다.

회색 머리카락을 어떻게 구할 수 있는지에 대한 좋은 조언이 있습니까?


"Eclipse IDE for Java Developers"버전은 가장 작은 버전이 아닙니다! "Eclipse Classic"을 찾으십시오. 언급 한 내용 중 대부분이 포함되어 있지 않습니다. 소스 코드와 함께 제공되기 때문에 다운로드 크기 만 더 큽니다.

비교 참조 : http://www.eclipse.org/downloads/compare.php


비어있는 Eclipse 플랫폼을 다운로드 한 다음 JDT 도구를 수동으로 설치할 수 있습니다.

  1. Eclipse 프로젝트 다운로드 페이지로 이동합니다 .
  2. 원하는 번들 ( 최신 릴리스)을 선택합니다 .
  3. 선택한 번들의 다운로드 페이지에서 :
    1. 플랫폼 런타임 바이너리 다운로드
    2. JDT 런타임 바이너리 다운로드
  4. 플랫폼 런타임 바이너리 아카이브 파일을 추출 하고 실행합니다 (예 :를 두 번 클릭 eclipse.exe).
  5. JDT 바이너리를 설치합니다.
    1. 클릭 아카이브 → ... 추가 → 새 소프트웨어를 설치 → 도움말 .
    2. 다운로드 한 JDT zip 파일을 선택하십시오.
    3. 범주 별 그룹 항목 선택을 취소합니다 .
    4. Eclipse Java Development Tools를 선택하십시오 .
    5. 프롬프트가 표시되면 다음을 클릭하여 Eclipse를 설치하고 다시 시작하십시오.

Eclipse 업데이트 사이트의 JDT

바이너리를 다운로드하는 대신 Eclipse 업데이트 사이트에서 JDT를 설치할 수도 있습니다.

이렇게하려면 다음을 수행하십시오.

  1. JDT 런타임 바이너리 다운로드를 건너 뛰고 플랫폼 런타임 바이너리 만 다운로드, 추출 및 실행합니다 .
  2. Install New Software로 이동 하지만 Archive 대신 Eclipse 다운로드 사이트를 선택했습니다.
  3. Eclipse Java Development Tools를 검색하고 설치 합니다.

Yoxos같은 타사 배포 빌더를 사용하여 원하는 것을 다운로드 할 수 있습니다.


이 파티에 조금 늦었지만 한동안 같은 질문을했고 지금은 좀 더 본격적인 이클립스 설치로 돌아가는 동안 다음과 같이 약간 능률화했습니다. 도움이 되었기를 바랍니다.

내가 필요한 것

기능 :

  • 자바 지원
  • Java + Java EE (XML) + 디버그 관점

거의 그렇습니다. Eclipse에서 사용하고 싶은 다른 것들이 많이 있지만, 다른 서버를 병렬로 실행해야하는 3GB 환경에 있었기 때문에 가능한 한 가장 얇게 유지해야했기 때문에 많은 비용을 감당할 수 없었습니다.

결과 관점 :

  • 경량 자바
  • 경량 브라우저 (코드 검토 및 코드 검사를 위해 상당히 조정 됨-실제로 다른 브라우저보다 무겁습니다)
  • 경량 디버그

제가 한

  • Eclipse Java EE 설치 (Java EE / XML 비트에 신경 쓰지 않는 경우 클래식 설치)
  • 배고픈 뷰 비활성화
    • 개요 비활성화 (필요한 경우 수행하십시오 CTRL+O)
    • 호출 및 유형 계층 비활성화
  • 데코레이터 비활성화
  • 메뉴 항목 비활성화 (오른쪽
  • 도구 모음 항목 비활성화
    • 더 나은 방법 : 도구 모음 숨기기
  • 호버 및 그와 관련된 작업 비활성화
  • 맞춤법 검사 비활성화
  • XML 유효성 검사 비활성화
  • Mylyn 비활성화
  • CTRL+H대화 상자 에서 필요하지 않은 검색 양식을 비활성화합니다 (실제로는 "파일 검색"모드 만 사용하고 때로는 "Java"모드 만 사용합니다).
  • 사용보고 비활성화
  • 불필요한 플러그인 또는 기능 비활성화
  • 시작시 자동으로로드되는 퍼스펙티브 및 플러그인을 비활성화합니다.
  • 내부 제한 제한 :
    • 일부 뷰에는 범위가 있습니다 (포함 클래스, 프로젝트, 작업 세트, 작업 공간 ...)
    • 일부 뷰와 UI 요소에는 경계가 있습니다 (콘솔 / 로거, 하이 라이터, 마커 ...)
  • eclipse.ini를 다음과 같이 조정하십시오.
    • -작업 공간을 청소하십시오 (느리지 만 나는 그것을 선호하는 경향이 있습니다)
    • G1GC 사용
    • 메모리 사용량을 줄이십시오 (예를 들어 G1과 함께 -xss128k 및 -xmx384로 완벽하게 살 수 있음을 알았습니다. 물론 YMMV는 항상 JVM 튜닝과 함께입니다.)
    • 서버 VM 사용 (그리고 VM의 DLL을 직접 가리킴)

또한 "디버그"및 "코드 브라우징"관점에서 필요하지 않은보기를 비활성화합니다.

죄송합니다.이 모든 것을 새 프로젝트에서 매번 다시 가져 오기 위해 3 가지 가벼운 관점의 집합으로 저장했지만 지금은 손에 넣을 수 없습니다. 그때를 찾으면 여기에 링크를 추가하겠습니다.


Eclipse Downloads 에서 준비된 패키지를 찾는 대신 동일한 페이지에서 Eclipse Installer로 이동하십시오. 현재 Mac, Windows 및 사랑하는 Linux에서 사용할 수 있습니다. 업데이트해야하는 설치 프로그램을 시작합니다 (또는 운이 좋으면 안됩니다 :)). 이 IDE에서 절대적인 최소값 인 "Eclipse Platform"을 선택하고 다른 설치 환경 설정을 설정하고 설치하십시오.

다운로드 / 설치 프로세스가 끝나면 Help-> Install New Software로 이동하여 Eclipse Marketplace (예,이 패키지에 포함되어 있지 않더라도)를 검색하여 생활을 좀 더 쉽게 할 수 있습니다.


가능한 한 최소한의 설치를하고 원하지 않는 나머지는 제거하십시오.

더 긴 답변 :

나는 약간 놀았다. 내가 실험 한 방법은 다음과 같습니다.

  1. Extract a clean eclipse*.zip to two different directories; call it eclipse and eclipse-bak. We'll only modify eclipse.
  2. Before starting it the first time, remove some of the features from the features folder. I got rid of org.eclipse.cvs, org.eclipse.epp.\*, ...mylyn\*, ...wst\*.
  3. Start up Eclipse to a workspace. Create in that workspace a Java project, debugging configuration, etc. Stuff that you would want to do and that will complain if we remove the wrong thing. Open up the Error Log view.
  4. Close Eclipse. Remove something (or a group of things) from the plugins folder.
  5. Open Eclipse. Check the error log to see if something you care about couldn't load. If it did, add those things back from eclipse-bak/plugins. If not, close Eclipse and return to step 4 for a new set of plugins.

Using this I got my configuration to still be able to edit and debug Java files, but including only these plugins:

com.ibm.icu*
org.apache.*
org.eclipse.compare*
org.eclipse.core*
org.eclipse.debug*
org.eclipse.draw2d*
org.eclipse.ecf*
org.eclipse.epp.package.java*
org.eclipse.equinox*
org.eclipse.help*
org.eclipse.jdt*
org.eclipse.jface*
org.eclipse.ltk*
org.eclipse.osgi*
org.eclipse.platform*
org.eclipse.rcp*
org.eclipse.search*
org.eclipse.team.core
org.eclipse.team.ui
org.eclipse.text
org.eclipse.ui*
org.eclipse.update*
org.hamcrest*
org.sat4j*

Most of that is core stuff, but you might be able to trim it down further. Notably gone are Mylyn, the usage collector, EMF, CVS, WST, even JUnit (though I think you should keep JUnit).


I feel you man, when working with Eclipse, the application is constantly trying to help. Ignoring workspace corruptions, I spend my development time fighting all the "helpful" things Eclipse does. XML is not that hard to read, but it still confuses the shit out of me when I get the XML designer. All it does for me is add an extra manual step to click on the source tab. Every time a new version of eclipse comes out they redesign the front page and the distributions. At which time a new quest starts for finding a way to debloat Eclipse again. I have the same experience with extensions to Eclipse by third parties and avoid them if at all possible. WTP has somewhat usefull stuff, but overall I prefer a basic java eclipse.

It is a good idea start with the Platform Runtime Binary and add JDT. Manually extracting the JDT runtime doesn't seem to work for me these days, so it it better to use the update client. You can use the marketplace client, but personally I have always found it rather annoying. An alternative is to use the director. The director can install JDT without starting the GUI.

Here is a script that downloads eclipse Oxygen 4.7.3a and installs JDT unnattended:

#!/bin/sh

die() {
    echo >&2 "$@"
    exit 1
}

[ "$#" -eq 1 ] || die "exactly 1 argument required [INSTALL_DIR]"
[ -e "$1" ] && die "*warning* Aborting! location exists, eclipse already installed?"

INSTALL_DIR="$1"
TARBALL=eclipse-platform-4.7.3a-linux-gtk-x86_64.tar.gz

mkdir -p $INSTALL_DIR
if [ ! -f $TARBALL ]
then
    wget http://mirror.csclub.uwaterloo.ca/eclipse/eclipse/downloads/drops4/R-4.7.3a-201803300640/$TARBALL
fi
tar -v -xf "$TARBALL" -C "$INSTALL_DIR" --strip 1

echo "\nUsing director to install java development tools, this may take a while..."
$INSTALL_DIR/eclipse -noSplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/eclipse/updates/4.7 -installIUs org.eclipse.jdt.feature.group

Simply call the script with one argument, the directory you want Eclipse installed. Running the script gives me an unpacked install of roughly 129MB, which is more than 100MB smaller than the default download (zipped). That is not to say you would not be able to shrink it further, but it should rid you of most of the crap. The executable will be cached for future executions of the script, but it will still be slow, since it needs to go online to download JDT. Unfortunately, I do not know of a way to cache the plugin download in a local folder. You could of course zip the created installation, but the script is easier to commit to git.

This script will only work for new users as long as the mirror stays up and will need some updates when a new version is released. But I am sure most developers are savvy enough to update the script if need be.


If you only want to use Eclipse for editing / Debugging Java I would suggest using a plain Text editor. It seems an overkill to install Eclipse and not use most of its features.

A very popular choice is VIM. Also check out this SO link for tips in using VIM as a Java editor. You can also debug Java code with a command line debugger as mentioned in this SO link.


Visual Studio Code

Fast forward to 2019 and we now can use Visual Studio Code with Java plugins. They provide a plugin pack to get you started with lightweight debugger and auto complete. Other plugins include maven integration, dependency viewer and more.

Visual Studio Code is a new(ish) editor/mini-ide from Microsoft which runs on Win/Max/Linux and has plugins for many languages.

Tutorial for setup: https://blog.usejournal.com/visual-studio-code-for-java-the-ultimate-guide-2019-8de7d2b59902

Edit 2019-06-21: MS now has a dedicated installer for Java integration with VS Code, including Spring Boot support as well. While the Intelisense is not 100%, it's vastly improved and now my go-to Java editor for testing and trying new things. Announcing the Visual Studio Code Installer for Java

참고URL : https://stackoverflow.com/questions/2992749/getting-a-lightweight-installation-of-java-eclipse

반응형