IntelliJ IDEA 기본 JDK를 어떻게 변경합니까?
IntelliJ IDEA를 개발 환경으로 사용하고 Maven을 종속성 관리에 사용합니다. IDEA 외부에서 프로젝트 구조 (디렉토리, 폼 등)를 자주 빌드 한 다음을 사용하여 프로젝트를 IDEA로 가져옵니다 Import project from external model
. 이것은 내 pom에서 maven-compiler-plugin이 JDK 1.6을 사용해야한다고 지정하고 가져올 때 IDEA가 Language Level Changed
and and that을 알려주고 Language level changes will take effect on project reload
프로젝트를 다시로드하라는 메시지를 표시 한다는 점을 제외하고는 훌륭하게 작동합니다 . 항상 같은 JDK 버전을 사용하기 때문에 성가신 일입니다.
새 프로젝트를 가져올 때마다 프로젝트를 다시로드 할 필요가 없도록 IntelliJ IDEA가 사용하는 기본 JDK를 어떻게 변경합니까?
이 설정은 "기본 프로젝트 구조 ..."대화창에서 변경됩니다. "파일"-> "기타 설정"-> "기본 프로젝트 구조 ..."로 이동하십시오.
그런 다음 "프로젝트 언어 수준"설정을 원하는 언어 수준으로 수정하십시오.
IntelliJ IDEA 12의 "기본 프로젝트 구조 ..."대신 "템플릿 프로젝트 구조 ..."에서이 설정이 사용되었습니다.
- IntelliJ IDEA 14.0.3을 사용하고 있으며 동일한 질문이 있습니다. 메뉴를 선택
File
\Other Settings
\Default Project Structure...
- 선택
Project
탭 섹션에서Project language level
드롭 다운 목록에서 레벨을 선택,이 설정입니다default for all new project
.
JDK 아카이브 파일 (.tar.gz)을 다운로드하여 압축을 풀고 '프로젝트 구조' 대화 상자 ( Ctrl+ Alt+ Shift+ S) 에서 SDK로 추가하십시오.
' 프로젝트 언어 레벨 '도 설정하십시오 .
최신 버전의 IntelliJ IDEA에서 Java 1.8이 필요하지만 기본적으로 구성되어 있지 않습니다.
우리의 경로 또는 구성 변경할 수 있습니다 Project Settings
> Project
>을Project SDK
여기에서 JDK의 경로를 편집하거나 추가 할 수 있습니다.
(제 경우에는 경로가에 있습니다 C:\Program Files\Java\jdk1.8.0_102
)
JDK 버전을 1.8로 변경
One other place worth checking: Look in the pom.xml for your project, if you are using Maven compiler plugin, at the source/target config and make sure it is the desired version of Java. I found that I had 1.7 in the following; I changed it to 1.8 and then everything compiled correctly in IntelliJ.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
The above responses were very useful, but after all settings, the project was running with the wrong version. Finally, I noticed that it can be also configured in the Dependencies window. Idea 2018.1.3 File -> Project Structure -> Modules -> Sources and Dependencies.
To change the JDK version of the Intellij-IDE himself:
Start the IDE -> Help -> Find Action
than type:
Switch Boot JDK
or (depend on your version)
Switch IDE boot JDK
참고 : https://stackoverflow.com/questions/18987228/how-do-i-change-the-intellij-idea-default-jdk
'Programing' 카테고리의 다른 글
if 문을 사용하여 종료 상태를 확인하는 방법 (0) | 2020.05.15 |
---|---|
UIImage : 크기 조정 후 자르기 (0) | 2020.05.15 |
Gulp를 사용한 Concat 스크립트 (0) | 2020.05.15 |
SQL Server 2008에서 테이블 별칭으로 UPDATE SQL을 작성하는 방법은 무엇입니까? (0) | 2020.05.15 |
MySQL에서 열 이름 바꾸기 (0) | 2020.05.15 |