Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #27891

Re: Will Java compiled in windows work in Linux?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Will Java compiled in windows work in Linux?
Date Thu, 27 Mar 2014 14:58:27 -0400
Organization A noiseless patient Spider
Lines 26
Message-ID <lh1scl$vp0$1@dont-email.me> (permalink)
References <d2e8d0cd-57cc-4467-99f9-c20523f08238@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Thu, 27 Mar 2014 18:58:29 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="bd4e1cba8d8592bec5d5ed9e4537fbfd"; logging-data="32544"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Jt0w+2yToKxdlTmC8zy/0"
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
In-Reply-To <d2e8d0cd-57cc-4467-99f9-c20523f08238@googlegroups.com>
Cancel-Lock sha1:f8fbeG+XjhXEAHLRUJgV46H4t8U=
Xref csiph.com comp.lang.java.programmer:27891

Show key headers only | View raw


On 3/27/2014 1:50 PM, D. Xenakis wrote:
> I have installed on my host linux server online the following file: "traccar-linux-64-2.7.zip (26-Jan-2014)" downloaded from the following link (http://www.traccar.org/download.jsp)
>
> 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)" ? I mean are they going to be identical?

     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.

     The "payload" in the class files should be identical (barring
severe version skew), but you'll need something more context-aware
than a full-file checksum.

> Second question: Should i compile this through a linux environment? For example Ubuntu, or can i do the compile from Windows environment too? For example windows 8.1 ?

     If the code is entirely in Java, it'll be "the same" (see above)
no matter what environment it's compiled on.  If there's any native
(non-Java) code, or if the archive includes things like installers
and such, all bets are off.

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Will Java compiled in windows work in Linux? "D. Xenakis" <sparkdevelopment.social@gmail.com> - 2014-03-27 10:50 -0700
  Re: Will Java compiled in windows work in Linux? Marcel Müller <news.5.maazl@spamgourmet.org> - 2014-03-27 19:15 +0100
  Re: Will Java compiled in windows work in Linux? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-03-27 14:58 -0400
    Re: Will Java compiled in windows work in Linux? "D. Xenakis" <sparkdevelopment.social@gmail.com> - 2014-03-27 13:04 -0700
    Re: Will Java compiled in windows work in Linux? Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2014-03-27 23:31 +0200
  Re: Will Java compiled in windows work in Linux? Roedy Green <see_website@mindprod.com.invalid> - 2014-03-28 00:16 -0700

csiph-web