【Eclipse】开启断言 assert

步骤:

  1. Window->Preferences->Java->Installed JREs->Edit
  2. Edit JRE->Default VM arguments->输入 -ea
    (ea:enable assertions)


    eclipse开启assert -step1
eclipse开启assert -step2
eclipse开启assert -step3

Eclipse: enable assertions
To globally set it as the default for everything:

  1. Go to menu Window (if you are on Windows), or go to menu Eclipse (if you are on Mac). For Linux it might be something similar.
  2. Go to Preferences.
  3. Choose Java, and then Installed JREs from the left panel.
  4. Select your JRE, and then click the Edit... button in the right panel.
  5. In the Default VM arguments field, add -ea.
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容