如何更新 Oracle 的 JVM?
我正在尝试解决 oracle jvm 中的 xml 验证问题
并且找到了另一个这样做的例子:
SAXParserFactoryfactory = SAXParserFactory.newInstance(); 工厂.setValidating(假); 工厂.setNamespaceAware(true);
SchemaFactory schemaFactory =
SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
factory.setSchema(schemaFactory.newSchema(
new Source[] {new StreamSource("contacts.xsd")}));
SAXParser parser = factory.newSAXParser();
XMLReader reader = parser.getXMLReader();
reader.setErrorHandler(new SimpleErrorHandler());
reader.parse(new InputSource("document.xml"));
但在我看来,这个例子期望使用较新版本的 Java,因此我的 JVM 中缺少一些方法和类。它们是SchemaFactory类和SAXParserFactory类的setSchema方法。我想更新,但我在oracle的技术支持论坛上没有发现它是可能的。
I'm trying to solve problem with xml validation in oracle jvm
And found another examples of doing that:
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating(false);
factory.setNamespaceAware(true);
SchemaFactory schemaFactory =
SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
factory.setSchema(schemaFactory.newSchema(
new Source[] {new StreamSource("contacts.xsd")}));
SAXParser parser = factory.newSAXParser();
XMLReader reader = parser.getXMLReader();
reader.setErrorHandler(new SimpleErrorHandler());
reader.parse(new InputSource("document.xml"));
But it seems to me that this example expecting to use newer version of Java therefore some methods and classes are absent in my JVM. They are SchemaFactory class and setSchema method of SAXParserFactory class. I want to update, but I didn't found on oracle's tech support forums that it is posssible at all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您指的是在 Oracle 内部运行的 JVM,那么它直接与正在使用的 Oracle 版本相关。获得更新的 JVM 的唯一方法是升级 Oracle。尽管也许如果有足够多的人提交增强请求,他们会将较新的 JVM 向后移植到较旧的版本。
If you mean the JVM that runs inside Oracle, it is directly tied to the version of Oracle that is in use. The only way to get a newer JVM is to upgrade Oracle. Although perhaps if enough people submit enhancement requests they will backport a newer JVM to older versions.