What does 4j mean?

JavaLibraries

Java Problem Overview


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

log4j, couchdb4j, neo4j, launch4j, etc..

Java Solutions


Solution 1 - Java

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.

Solution 2 - Java

I'd guess it means "for java"

On this page slf4j it even says

> The Simple Logging Facade for Java or (SLF4J)

Solution 3 - Java

It is an abbreviation for 'for Java'.

Solution 4 - Java

For java , as simple as this :D

Solution 5 - Java

4j ~ for Java. And I'm only writing more text because SO answers require a minimum of 15 characters, which is hardly to reach with an answer for this question - which should be community wiki anyway, to my opinion, even though it's legal and I guess, a lot more people just read this acronym without thinking about what it might stand for. ;)

But at least it's an opportunity to remind the community of a famous answer, given by ammoQ, on MasterPeter's now closed and deleted subjective question "Did Java steal away the fun from programming?":

> Don't put the blame on Java; it's the > abundance of frameworks that make a > java developer cry. You can't even > poop without using the Poop4J > framework.

(Question can still be found in google's cache)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVerhogenView Question on Stackoverflow
Solution 1 - JavaRyan EmerleView Answer on Stackoverflow
Solution 2 - JavaNeil FoleyView Answer on Stackoverflow
Solution 3 - JavaGalwegianView Answer on Stackoverflow
Solution 4 - JavaRakesh JuyalView Answer on Stackoverflow
Solution 5 - JavaAndreas DolkView Answer on Stackoverflow