[英]Java xslt not working when jared
My problem only occurs when I jar my application. 我的问题仅在我打包应用程序时发生。 It works fine from under eclipse. 在日食下工作正常。
This is what loggs: 这是loggs:
javax.xml.transform.TransformerConfigurationException: Cannot find external method 'com.intellgis.saxonTransformExtensions.TransformCoordinates.convertGMLPosList' (must be public) javax.xml.transform.TransformerConfigurationException:找不到外部方法“ com.intellgis.saxonTransformExtensions.TransformCoordinates.convertGMLPosList”(必须是公开的)
(I also get similar errors for methods that are in other libraries I wrote earlier) (对于我之前编写的其他库中的方法,我也会遇到类似的错误)
From what I can think of it probably occurs because the system java doesn't have the correct classpath specified. 从我的想法来看,可能是因为系统java没有指定正确的类路径。
The question is: 问题是:
How can I fix it (add a classpath to the xsl file). 我该如何解决(将类路径添加到xsl文件)。
Update: 更新:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7"/>
<classpathentry kind="lib" path="lib/gt-api-2.7.5.jar"/>
<classpathentry kind="lib" path="lib/gt-epsg-wkt-2.7.5.jar"/>
<classpathentry kind="lib" path="lib/gt-main-2.7.5.jar"/>
<classpathentry kind="lib" path="lib/gt-metadata-2.7.5.jar"/>
<classpathentry kind="lib" path="lib/gt-opengis-2.7.5.jar"/>
<classpathentry kind="lib" path="lib/gt-referencing-2.7.5.jar"/>
<classpathentry kind="lib" path="lib/jai_core-1.1.3.jar"/>
<classpathentry kind="lib" path="lib/jsr-275-1.0-beta-2.jar"/>
<classpathentry kind="lib" path="lib/jts-1.8.jar"/>
<classpathentry kind="lib" path="lib/resolver.jar"/>
<classpathentry kind="lib" path="lib/saxonTransformExtension.jar"/>
<classpathentry kind="lib" path="lib/serializer.jar"/>
<classpathentry kind="lib" path="lib/vecmath-1.3.2.jar"/>
<classpathentry kind="lib" path="lib/xalan.jar"/>
<classpathentry kind="lib" path="lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="lib/xercesSamples.jar"/>
<classpathentry kind="lib" path="lib/xml-apis.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Your eclipse project has defined some dependencies which are not part of the standard jvm, otherwise your eclipse project cannot find the com.intellgis classes. 您的eclipse项目已定义了一些不属于标准jvm的依赖项,否则eclipse项目无法找到com.intellgis类。
You need to add these jars to your classpath by either setting the CLASS_PATH environment variable or passing it on to the java or javaw executable. 您需要通过设置CLASS_PATH环境变量或将其传递给java或javaw可执行文件,将这些jar添加到类路径中。 More information on this can be found on the tools documentation http://docs.oracle.com/javase/tutorial/essential/environment/paths.html 可以在工具文档http://docs.oracle.com/javase/tutorial/essential/environment/paths.html中找到有关此内容的更多信息。
See also this http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html 另请参见此http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.