[Error] Command line is too long. Shorten the command line via JAR manifest or via a classpath file and rerun

null·2023년 9월 8일
0

Error

목록 보기
2/2

발생원인

  • IntelliJ에서 바로 실행할 때에는 class path를 자동으로 잡게 하는데, 이 때문에 run command가 너무 길어져서 발생하는 문제
    (정상적으로 실행되는 경우에도 run command가 길다)

해결책

  • Run/Debug Configuration에서 Shorten command line의 옵션 수정

  • None: 기본 옵션 값. IDE에서 긴 classpath를 줄여주지 않는다. command line이 OS limit를 초과하는 경우 IDEA는 애플리케이션을 실행할 수 없다

  • JAR Manifest: IDE는 임시 claspath.jar를 사용해서 긴 classpath 사용을 회피한다. 실제 classpath는 classpath.jar의 MANIFEST.MF 안에 정의되어 있다.
    classpath file: text 파일에 긴 classpath를 써둔다.

  • User-local default: Legacy property이다. IDE는 idea/workspace.xml 파일에서 지정된 옵션 값을 따른다

0개의 댓글