上面的示例代码中含有一个特定于Xerces的类,但是其他方法不会像它一样与某个特定的供应商类紧密绑定在一起。
The example above includes a Xerces-specific class in the code, but other ways aren't as tightly tied in to a specific vendor class.
请注意,尽管您的代码可能没有直接引用供应商类,但供应商类也按名称被动态装入 JVM,因此在运行时它们一定要在您程序的类路径(classpath)中。
Note that while your source code may not reference vendor classes directly, the vendor classes are loaded into the JVM dynamically by name, so they must be in your program's classpath at run time.
大多数供应商提供在调用后可以返回一个连接的工厂类。
Most vendors supply factory classes that will return a connection upon being invoked.
应用推荐