Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jar file naming conventions

Tags:

Are there any industry standard conventions for naming jar files?

like image 614
Ron Tuffin Avatar asked Sep 23 '08 06:09

Ron Tuffin


People also ask

What is a good file naming convention?

File naming best practices:Avoid special characters or spaces in a file name. Use capitals and underscores instead of periods or spaces or slashes. Use date format ISO 8601: YYYYMMDD. Include a version number (Creamer et al.

Does the name of a JAR file matter?

The jar file name does not matter.

What is the naming convention for Java files?

In Java, the java file name should be always the same as a public class name. While writing a java program first it is saved as a ". java" file, when it is compiled it forms byte code which is a ".


2 Answers

I have been using

*Informative*-*name*-*M*.*m*.*b*.jar 

Where:

M = major version number (changed when backward compatibility is not necessarily maintained)

m = minor version number (feature additions etc)

b = build number (for releases containing bug fixes)

like image 69
Ron Tuffin Avatar answered Oct 09 '22 03:10

Ron Tuffin


If your jar is used for JEE then these guidelines apply:

The module name is used as the EJB archive name. By default, the module name should be based on the package name and should be written in all-lowercase ASCII letters. In case of conflict, the module name should be a more specific version (including other part of the package name):

EJB archive: -ejb.jar

EJB client archive: -ejb-client.jar

like image 28
wdk Avatar answered Oct 09 '22 02:10

wdk