当前位置:   article > 正文

java compile error_Java Compile Error: The code of method is exceeding the 65535 bytes limit | 学步园...

java compile error

Issue:

When you compile your java class, you may got following error.

The code of method is exceeding the 65535 bytes limit

Reason:

According Java specification, one Java method size must be less than 65535 Bytes (64k). In most cases you encounter this error is because you want to init a big data or your java class is generated by some toolkit.

Solution:

One workaround is divide your big size method into some pieces of small size methods.

For example,

public static Float[][] getSMatrix()

{

initSMatrixPart1() ;

initSMatrixPart2() ;

initSMatrixPart3() ;

initSMatrixPart4() ;

initSMatrixPart5() ;

return sMatrix;

}

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/224407
推荐阅读
相关标签
  

闽ICP备14008679号