Is there a diffence in size of class file on two different platforms?
Suppose I have one java file with huge code. If I build this file on diffe开发者_运维技巧rent platforms. Like windows and solaris. Is there a possibility that the two class files having recognizable different size? If yes what is the reason?
If you use different versions of the compiler, or different settings (particularly with regard to what debug information is included) that could change the size of the file. The same compiler version with the same options should produce the same size of file though - I'd generally expect them to produce the exact same file.
Different compilers can generate different byte code, and being that different platforms might have different compilers that might be the case. But the platform itself shouldn't change the byte code.
精彩评论