Historically, the idea was that java packages. * would be the ones sent along with the JDK, and the javax packages. * - These are the ones that need to be downloaded separately. He still works this way, to some extent; all java packages. * come with JDK, and there are many javax packages. *, for example, for servlets that need to be downloaded separately.
The monkey key was thrown into this circuit when Sun decided to move some javax. * Packages, such as Swing, in the main JDK. They were actually going to change the package name from javax.swing to java.swing, but when it became clear that it would break backward compatibility for a huge amount of code, they decided to move the packages instead, but keep javax. swing name. Thus, the name is no longer indicative, but exists for historical reasons.
I would not be surprised if this happened with the org.omg and org.w3c packages (these were third-party libraries that were moved to the main JDK and the names could not be changed). Regardless if it is in the JDK API docs, you can use it without loading anything other than the main JDK, and the class loader will find it in order.
source share