Click to enter _ more _java thousand ask
1, Java, javax, Sun, org package what is the difference
java, javax, org, and sun packages are all class packages provided by the JDK and are all in Rt.jar. Rt.jar is the Java base Class library (a very important package in the Java Core framework), which contains most of the functions of Lang, and Rt.jar default is in the load path of the root ClassLoader, so classpath is superfluous. The differences between them are specific as follows:
See the Java core Framework here: What is the Java core framework?
Java.*
Java SE's standard library, which is part of the Java standard, is a externally-committed Java development interface that is generally backward compatible and is not easily modified. All JDK implementations, including those from other manufacturers, are the same on java.*.
javax.*
is also part of the Java standard, but is not included in the standard library and is typically an extension of the standard library. Usually belong to a particular domain, not a generic API.
So the API is provided in an extended manner to avoid the JDK's standard library being too large. Of course some of the early javax were later incorporated into the standard library, and all should also belong to the new version of the JDK's standard library. For example, Jmx,java 5 was previously provided as an extension, but Jdk5 is part of the standard library, and all javax.management are part of the JDK5 standard library.
com.sun.*
is the implementation class for Java.* and javax.* in Sun's hotspot virtual machine. Because it is included in the RT, we can also invoke it. However, because it is not the interface of Sun's external commitment, it can be increased or decreased according to the needs of the implementation, so it may be different in different versions of the hotspot, and it is not in the other JDK implementations, calling these classes may not be backwards compatible, so it is generally not recommended.
org.omg.*
Is the Java class Library provided by the Enterprise or the organization, most of it is not provided by Sun Company, with com.sun.*, do not have backward compatibility, will increase or decrease as needed. Among the more commonly used are the XML, Web pages, server classes, and interfaces provided by the website.
Java ask _02 Basic use (010) _java, javax, Sun, org package What is the difference