Is there a difference in the size of the class file on two different platforms?

Suppose I have one java file with huge code. If I create this file on different platforms. Like windows and Solaris. Is it likely that two class files have a recognizable different size? If so, what is the reason?

+4
source share
2 answers

If you use different versions of the compiler or different settings (especially regarding what debugging information is included), this can change the file size. The same version of the compiler with the same parameters should contain the same file size - I usually expected that they would create the same file.

+3
source

Different compilers may generate different bytecode, and since there may be different compilers on different platforms that may take place. But the platform itself should not change the byte code.

+3
source

All Articles