Reputation: 41
Suppose I have one java file with huge code. If I build this file on different platforms. Like windows and solaris. Is there a possibility that the two class files having recognizable different size? If yes what is the reason?
Upvotes: 4
Views: 587
Reputation: 1500835
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.
Upvotes: 4
Reputation: 28568
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.
Upvotes: 3