Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeder2.news.elisa.fi!feeder1.news.elisa.fi!uutiset.elisa.fi!7564ea0f!not-for-mail From: Jukka Lahtinen Newsgroups: comp.lang.java.programmer Subject: Re: Will Java compiled in windows work in Linux? Organization: N/A References: X-no-archive: yes Content-Transfer-Encoding: 8bit Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:QTBKv/TjuJ5mc0U0yU9xTXVIrYU= MIME-Version: 1.0 Content-Type: text/plain Lines: 27 Date: Thu, 27 Mar 2014 23:31:43 +0200 NNTP-Posting-Host: 91.155.88.191 X-Complaints-To: newsmaster@saunalahti.com X-Trace: uutiset.elisa.fi 1395955903 91.155.88.191 (Thu, 27 Mar 2014 23:31:43 EET) NNTP-Posting-Date: Thu, 27 Mar 2014 23:31:43 EET Xref: csiph.com comp.lang.java.programmer:27893 Eric Sosman writes: > On 3/27/2014 1:50 PM, D. Xenakis wrote: >> First question: If i want to compile from scratch on my machine using >> their source code unmodificated from here >> (http://www.traccar.org/source.jsp), would the new generated traccar.run >> file, have the same hash with "traccar-linux-64-2.7.zip (26-Jan-2014)" ? > Possibly not. If you compile with a different Java version > than they used, the class file format's version number might be > different. If you use different compiler options than they did, > the class files may contain different kinds and amounts of debugging > information. Even if the class files are identical, the archive's > hash code may be different if you used a different ZIP utility. I would say they almost certainly have different hash codes. The zip file format includes not only the contents of each file packed in the zip, but also the timestamps of each file, and they WILL be different when you re-compile the classes, even with an identical computer with identical operating system, jdk and all possible options. But because a hash code doesn't contain ALL the information of the file, there is a slight possibility that they might still happen to have the same hash code. -- Jukka Lahtinen