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

Hibernate deleting data from related join table for multiple Many-to-Many relationships
Get number of active threads in java
Get gradle build path folder from java
Unable to start activity ComponentInfo: Error inflating class android.support.design.widget.CoordinatorLayout
Splitting String in Java with empty elements
#JsonSerialize not working
MOA's StreamKM clustering doesn't return any result
Can't access classes in Portable Class Library
Notifications won't appear
the executorService throw RejectException with SynchronousQueue
Implementing Repository Pattern With RxJava
Activity used to start app doesn't exist (Cannot open Calculator app in Android 5.1.1)
While writing to excel file it loses some data. Java
Arrayadapter issue in android studio (android.R.layout.something did not work)
Why the switch statement does not enter to the case 2?
Java 'Background' opens to small to see anything

Categories

HOME
cakephp
keras
raspberry-pi
getelementsbytagname
rsync
malloc
gps
baqend
networkx
uber-api
ios-charts
tomcat6
fortumo
ef-migrations
pugjs
django-cms
karma-jasmine
alpine
mmap
restful-authentication
icloud-api
angular2-aot
xpages-ssjs
fish
info.plist
gitignore
vision
procdump
librato
unboundid
directx-10
siesta-swift
catel
language-concepts
plsql-psp
xcode-extension
retina-display
mixture-model
vapor
greenrobot-eventbus
sas-visual-analytics
mapzen
turbogears
total-commander
gpx
reactive-cocoa-5
convertapi
alphabet
carrot
pg-dump
font-size
media-player
ifs
nbconvert
webdriverjs
gnome-shell-extensions
firmata
azure-sdk
xml-attribute
fuzzy-search
clang-static-analyzer
pagedlist
spim
cannon.js
cyclomatic-complexity
jmeter-maven-plugin
wordml
ibaction
streambase
bridge.net
fpml
document-classification
ceil
has-many-through
viadeo
imdbpy
jsctypes
batterylevel
rabl
automount
qtkit
hgsubversion
nsdatecomponents
gwt-ext
hamachi
gdlib
lpeg
ti-dsp
scripting-languages
private-members
mdac

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile