각진 세상에 둥근 춤을 추자

[Intellij] javac 명령어 실행 + 에러 (error: does not exist, cannot find symbol) 본문

Java

[Intellij] javac 명령어 실행 + 에러 (error: does not exist, cannot find symbol)

circle.j 2024. 4. 17. 15:59
1. JDK(Java Development Kit) 설치 

https://www.oracle.com/java/technologies/downloads/#java8-windows

 

Download the Latest Java LTS Free

Subscribe to Java SE and get the most comprehensive Java support available, with 24/7 global access to the experts.

www.oracle.com

 

java -version

 

2. 환경변수 설정

1) 윈도우 + R > sysdm.cpl 입력 > 고급 > 환경변수 

 

2) 시스템 변수 > 새로 만들기 

  • 변수 이름: JAVA_HOME
  • 변수 값: JDK가 설치된 경로

 

3) 시스템변수 > Path > 편집

 

새로 만들기 > %JAVA_HOME%bin 입력 > 가장 위로 이동

javac -version

 

 


error: does not exist, cannot find symbol

 

[해결방법1] File > Invalidate Caches (캐시 지우기)

 

[해결방법2] Gradle > Refresh Gradle Dependencies

# build.gradle에 아래 의존성 추가

dependencies {
    implementation group: 'org.springframework.boot', name: 'spring-boot', version: '2.6.4'
}

 

'Java' 카테고리의 다른 글

[InteillJ] InteillJ Maven WAR 파일 생성  (0) 2024.03.05
[Java] Swing - 이벤트  (0) 2022.10.24
[Java] Swing - Container Layout Manager  (0) 2022.10.10
[Java] Swing - JFrame  (0) 2022.10.10
[Java] GUI 프로그래밍  (0) 2022.10.10