zip vs jar. When to use what? Which one is performant?
jar - the default 'jar' utility (and a file format as well. Read more about the JAR file format in this article - JAR, WAR, and EAR >>) is the Sun's implementation which has been written in Java language. This is obviously slower (though only slightly) than those 'jar' utilities which have been written using C language. 'fastjar' is an example of a 'jar' tool written in C. Though it has its own limitations, but it's slightly faster than the default 'jar' implementation supplied by Sun Microsystems with JDK.
'jar' mainly supports class, audio, and image file formats and whenever a new file is added to a jar file then the utility first checks the format of the file and accordingly it may need to the MANIFEST file or any other indexes if applicable. Read more about the manifest file in this article - MANIFEST file of a jar file >>
zip - this is a simple archiving and compressing tool (and a file format as well). In fact the JAR file is also internally archived and comprssed as a zip file only. Unlike a jar file it doesn't maintain any additional information about the files or the type of the files contained in the archive. Obviously this archiving tool is much more faster than 'jar', and hence this is recommended in the cases where the archiving of the files is all what the user needs.
jar vs zip
Thus we see that 'zip' will almost always have better performance and hence recommended if the user is interested only in archiving and 'jar' should be used only when the extra information supplied with the resultant JAR files are being used (or will be used in the future) by the application (or the tool) in some way or the other.
Monday, August 18, 2008
zip vs jar. When to use what? Which one is performant?
Subscribe to:
Post Comments (Atom)
3 comments:
hi,geek
how can we create explorer like functionality in java/j2ee.
is there any method to create it without using swing.
thanks.
hi, geek
i want to refresh my page automatically whenever any event(eg.remove link)occur.
plz help me.
thanks
Hello Ranvijay,
Please find below the answers to your questions:-
How to implement a explorer type functionality using Java/J2EE?
I believe you're looking to implement menus which can expand and collapse just like the Windows Explorer tree. If that's the case using a plain JSP is not advisable. You can use the JavaServer Faces technology instead.
You can either think of using the plain JSF or any of the several even better alternatives including Apache MyFaces, ADF Faces, etc.
You just need to create a master-detail relationship as per your requirements and then you can use the 'tree' component to implement the expanding-collapsing menus very easily.
You may like to go through the following links to learn more:-
JSF Documentation: http://java.sun.com/javaee/javaserverfaces/reference/docs/index.html
Developing sample Web App with JSF: http://java.sun.com/developer/technicalArticles/GUI/JavaServerFaces/
Apache MyFaces: http://myfaces.apache.org/index.html
Integration strategy for Struts and JSF: http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg08457.html
Refreshing page automatically based on some event
Agan using a plain JSP will make the implementation very difficult (if at all possible). You can use JSF PPR (Partial Page Rendering) to implement any such scenario in just few minutes. Apache MyFaces and ADF Faces take the ease and power of implementation few notches even higher than JSF.
Apache MyFaces PPR: http://myfaces.apache.org/trinidad/devguide/ppr.html
Hope the info helps. Keep visiting/posting!
Post a Comment