java


Why does the same JAR file have different hash every time I build it?


I've been thinking about checking jar file's hash value to determine if it has changed or not, but as it turns out the same jar file has different hashes every time I build it (export as jar file from eclipse, or build it using maven). I've removed manifest file's date values and stuff but it still is different. Is there something in bytecode generation which includes a timestamp or something?
A JAR file is a ZIP file and it contains a last modified date in its local file headers and central directory file header. This will lead to different hashes of your builds.
If you run the JAR command on the exact same set of files (with same file dates) and skip manifest file creation it should give you the exact same JAR file (if the order of files inside the ZIP does not change).

Related Links

Why it is not suggested to pass hardcoded absolute path name to File object constructor File(String)
Java: 32-bit fp implementation of Math.sqrt()
Charles web debugging proxy request java
RCP Application PDE build generated feature.xml unpack=false
Detect Marker Position in 2D image
Why the random function in java is always generating high values?
How to set FragmentTabHost dynamic height using xml or java
How to get one “a href” out of many in one html class with jSoup
How to get Zebra USB printer status from JAVA
Attempt to invoke virtual method 'void android.widget.ImageView.setImageBitmap(android.graphics.Bitmap)' on a null object reference
How to implement a nested java interface in scala
How to send Java objects that are not defined structures in Thrift
SQL Statement and Prepared Statement error
remove dynamically added panels
How to find out where exact young/old gen is located in memory?
cancel() vs remove() on executors

Categories

HOME
pypi
gerrit
netsuite
netbeans
urbancode
isabelle
mediawiki
deezer
drivers
smarty
iterator
infragistics
amazon-ecs
disassembler
yum
wamp
webrequest
medical
elasticsearch-hadoop
iggrid
kibana-4
dax
php-7.1
moonmail
gz
event-handling
quickfix
jsprit
caml
angular-ui
undefined
interop
emulator
zapier
autoconf
graphicsmagick
google-search-api
devops
format-specifiers
lcd
crystal-reports-2010
p-value
sqlcipher
microsoft-sync-framework
vlsi
facet
pingfederate
buck
flink-streaming
nouislider
noraui
winrt-xaml-toolkit
gammu
normal-distribution
unspecified
sqlite2
temporary-files
cookiecutter-django
mapzen
nomethoderror
total-commander
wso2carbon
paxos
boost-multi-index
alphabet
drupal-6
ifs
pearson
blacklist
angular-strap
elements
intrusion-detection
fody
measures
py2app
merge-conflict-resolution
python-3.2
wordml
coveralls
createprocessasuser
unity3d-gui
tween
nstableviewcell
xcode-6.2
bitcoinj
hippomocks
mcts
flexmojos
cdc
sitemesh
listings
yui-compressor
plasma
orchardcms-1.7
spring-validator
smtp-auth
free-variable
anonymous-methods
cisco-jtapi
multipage
online-compilation
dotnethighcharts
psi
horizontal-accordion
xsdobjectgen
preference
database-management
uimenucontroller
multiple-languages
lzh

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile