Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does 4j mean?

Tags:

java

libraries

I notice a number of java libraries use this as a suffix:

log4j, couchdb4j, neo4j, launch4j, etc.. 
like image 559
Verhogen Avatar asked Dec 01 '09 12:12

Verhogen


2 Answers

Since the number 4 (four in English) is a homonym for the preposition for, it's being used to indicate that the library is for Java.

In .NET, libraries are sometimes prefixed with n to indicate that they are the .NET variant. For instance, Java has Hibernate and .NET has nHibernate. You also have cases where Java follows this "convention" such as jUnit (where .NET has nUnit).

As a beginning developer I, too, was confused by the 4j naming convention. I thought it was some kind of version indicator until I noticed several libraries carrying the suffix.

Maybe now a Google search will turn up a meaningful result for "4j" :)

EDIT:

I've been unable to find the origin of the 4j suffix, but my best guess would be that it started with log4j which now has variants such as log4net, log4php, log4cxx.

like image 83
Ryan Emerle Avatar answered Oct 08 '22 05:10

Ryan Emerle


I'd guess it means "for java"

On this page slf4j it even says

The Simple Logging Facade for Java or (SLF4J)

like image 27
Neil Foley Avatar answered Oct 08 '22 05:10

Neil Foley