【Eclipse】开启断言 assert

2018-02-14  本文已影响44人  Joey_GZ

步骤:

  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.
上一篇下一篇

猜你喜欢

热点阅读