Visual Studio Code에서 Java 개발 환경의 기본

7065 단어 자바VSCode

하고 싶은 일



Java 버전 관리
체크 스타일
테스트를 IDE에서 실행
환경 변수 설정
Breakpoint의 Debug

Java Runtime


java.home in settings.jsonCommand + Shift + P




Checkstyle


check_style.xml 가 있으면 마우스 오른쪽 버튼을 클릭하고 set the Checkstyle Configuration file

  • ぁtps://마르케 tp.ゔぃすあ lsつぢお。 이 m/있어 ms? 있어 m 핥기 = しんg ちぇ응. vs 코데 치 CKSTY ぇ

  • ぇtps:// ぇ CKSTYぇ. 그렇게 r세후레. 이오/베긴인 g_으로 ゔぇぉp면 t. HTML <- 불행히도 VSCode가 없습니다

  • settings.json
    "java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
    

    Test



    java test runner 이라는 Extention을 설치하고 위의 Runtime을 제대로 설정하면 VSCode에서 테스트를 실행할 수 있습니다.

    환경 변수 설정



    launch.json
    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
            {
                "type": "java",
                "name": "Launch Current File",
                "request": "launch",
                "mainClass": "${file}"
            },
            {
                "type": "java",
                "name": "Launch SampleApplication",
                "request": "launch",
                "mainClass": "com.nakamasato.testapp.SampleApplication",
                "projectName": "testapp",
                "env":{
                    "TEST_ENV": "value"
                }
            }
        ]
    }
    

    Breakpoint에서의 Debug



  • Breakpoint 켜기


  • Debug에서 Run

  • 확인



  • 감상


  • 한가지로 설정은 할 수 있었다
  • intellij가 Java 개발에 좋다고 듣기 때문에 언젠가 비교도

  • 참고


  • htps : // 메이 m. 이 m/@타쿠 l. 이 sm. 로 ny / ぇあ rニン gーー54073f2후264
  • htps : // 여기.ゔぃすあ lsつぢお。 코 m / 두 cs / 에와 r / 헷갈린 g
  • 좋은 웹페이지 즐겨찾기