The separation between these packages is for a better organization.
The java package is more basic and the javax
package is extra, enhanced functionality that can make use of pure java classes or not.
The classes of the java
package are older, whereas the javax
classes are extensions. Note that in the sql case, if you are to parse the javadoc of a javax
class, it must also contain import for the basic java classes you are taking, add extra features. Already seeing the javadoc of a pure java package class, you will not find class imports from the javax package.
In short, javax complements the pure java classes.