展开全部
在java规范中没2113有限制类名的长度,但5261是系统4102本身会限制。
下面是1653详细说明:java这个回语言本身答:没有限制。
java虚拟机本身的规范:The length of field and method names, field and method descriptors,
and other constant string values (including those referenced by
ConstantValue (§4.7.2) attributes) is limited to 65535 characters by
the 16-bit unsigned length item of the CONSTANT_Utf8_info structure
(§4.4.7).
在java虚拟机看来类名本生也是字符串,所以java虚拟机规范是限制为65535
3.系统本身
Linux文件名的长度限制是255个字符
windows下完全限定文件名必须少于260个字符,目录名必须小于248个字符。