在eclipse中
点击运行旁的小三角形--->Run Configurations--s->点右窗口中(x)=Argument页签--->
VM arguments文本框中输入:-ea --->运行ok.
在myEclipse中
Windows--> Preferences--->Java--->Installed JREs--->点击正使用的JDK--->Edit--->
Default VM Arguments文本框中输入:-ea --->运行ok.
点击运行旁的小三角形--->Run Configurations--s->点右窗口中(x)=Argument页签--->
VM arguments文本框中输入:-ea --->运行ok.
在myEclipse中
Windows--> Preferences--->Java--->Installed JREs--->点击正使用的JDK--->Edit--->
Default VM Arguments文本框中输入:-ea --->运行ok.