Is there a reason for separating the java and javax packages?

Asked

Viewed 1,068 times

15

In the java documentation, there are several packages organized within the package java and javax, for the most part. There are even some packages that seem to be duplicated, such as java.sql and javax.sql. Is there any explanation for this separation?

2 answers

13


The separation between these packages is for a better organization. The java package is more basic and the package javax are extra features, enhanced, that can make use of pure java classes or not.

The classes of the package java are older, already the classes of javax are extensions. Note that in the case of sql, if parsing javadoc one-class javax, it must also contain the import for the basic java classes you are taking, to add extra features. Already viewing javadoc from a pure java package class, you won’t find javax package class Imports.

In short, javax complements pure java classes.

  • 1

    Antonio, I removed the final section so that the content of your answer is objective, focusing only on answering the question.

4

Following the Reasoning line of Stack Ingles available here:

javax vs java package

Historically speaking:

Originally Java Extensions in a pre-existing JRE were placed as javax, ie originally the javax package is only made for java package extensions

One of the reasons for this was the NETSCAPE, the same limited some packages that were available on JAVA PACKAGE

Today, for the community at least, the javax/java point has been lost, because today everything that exists in javax practically exists in java.

Note: Snippets of the answers in the English stack of the link provided

  • 1

    I will translate and then put to Facilitate

Browser other questions tagged

You are not signed in. Login or sign up in order to post.