Boolean.getBoolean("myvariable"); // where myvariable has been defined in the
// Environment variable as Variable name:
// myvariable
// and Variable Value:true
위의 호출을 통해 출력 결과는 false
입니다. 내가Boolean.getBoolean() Vs System.getenv() in Java
System.getenv("myvariable") ;
를 사용하는 경우 다음은 true
로 나에게 출력을 제공합니다.
Boolean.getBoolean("myvariable")
이 작동하지 않는 이유가 궁금합니다.
귀하의 의견에'testbootlog'가 정상적으로'getBoolean'에 전달되는 것 같습니다. –
메서드에 'Boolean.getSystemPropertyAsBoolean'과 같은 의미있는 이름이 있다면, 모든 혼동을 해결할 수 있습니다. –
예 @JamesMontagne, 수정 해 주셔서 감사합니다. – Prakash