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

ClassCastException for the same class type in Spring-sync
Set registerOutParameter as json datatype
How to display Primeface Calendar with Buddhist Era format
Stanford POS tagger in Maven project
Java generic type check for classes with two generic paramters should only hold classes of same type
Java TLS/SSL socket with custom public private keys?
hibernate not determining entity classes as field variables
Selenium/PageFactory: Find child elements using parent element's #FindBy?
Using Selenium Webdriver TakesScreenshot method to capture a base64 image. Can I reduce the image size?
How does Hibernate behave if set both non-JTA and JTA data source in instance of class LocalContainerEntityManagerFactoryBean?
JTabbedPane FocusTraversalPolicy
maven dependency plugin ignores dependency versions? [duplicate]
java.lang.ClassNotFoundException: weblogic.jdbc.wrapper.JTSConnection
In Spring does bean gets created first or Instance gets created first via Constructor
Java generic class as parameter
a prime number program that allows the user to test numbers till the user enters zero. However, after testing 6 numbers, it prints incorrect message

Categories

HOME
image
fluentd
json.net
react-virtualized
relative-path
lodash
tesseract
framework7
cmd
cakephp-2.5
in-app-purchase
uber-api
bs4
circular-dependency
fallback
workload-scheduler
facebook-page
invantive-sql
propel
flux
opencover
arabic
tdd
status
bootstrap-material-design
entitlements
elasticsearch-ruby
neo4j-spatial
facebook-apps
jaxb2
instant-messaging
titanium-mobile
gtrendsr
protovis
file-format
streamsets
sharefile
az-application-insights
impersonation
android-fingerprint-api
webdriver-manager
bootstrapper
squib
graphenedb
optix
nand2tetris
netcdf4
segment
websphere-mq-fte
galleria
upstart
jedis
powercli
spring-cache
dwscript
eventkit
url-pattern
infix-notation
skobbler-maps
django-debug-toolbar
make-install
bluemix-app-scan
jms2
teamcity-8.0
ora-00900
mutation-observers
simple-framework
drawbitmap
createprocessasuser
proj4js
e10s
directoryservices
rake-task
cdt
googlemock
xojo
project-planning
tld
yorick
xsockets.net
dir
google-cloud-save
back-stack
padarn
mylyn
seed
unc
quickdialog
propertyeditor
stage
mod-auth
radcombobox
infrastructure
simpletest
text-coloring
dbisam
ugc
ajax-forms

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App