Java文件中出现这样的提示错误与解决方法:Cannot return from outside a function or method?

1.打开  >>  Myeclipse或Eclipse.(我使用的是Myeclipse)

2.打开  >>  Window  >>  Preferences  如图1:

图1

3.打开  >>  Preferences  >>  MyEclipse  >>  Validation  >>  JavaScript validator for JS files(Bulid中的"√"去掉)  如图2:

图2

4.Apply  >>  ok!

*5.另一种方法:项目右键  >>  MyEclipse  >>  Exclude  From Validation(打"√")

posted @ 2014-10-14 17:27  罗科-ROCCO  阅读(962)  评论(0编辑  收藏  举报