2013-10-02 45 views
0

我的問題只發生在我jar我的應用程序。它從日食下正常工作。爪哇xslt不工作時jared

這是loggs:

javax.xml.transform.TransformerConfigurationException:找不到外部方法 'com.intellgis.saxonTransformExtensions.TransformCoordinates.convertGMLPosList'(必須是public)

(我也得到類似我之前編寫的其他庫中的方法出錯)

從我能想到的情況來看,可能是因爲系統java沒有指定正確的類路徑。

的問題是:

我怎樣才能修復它(添加類路徑XSL文件)。

更新:

<?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> 
+1

是否發現你有這個類的地方在你的罐子?現在什麼是類路徑? – Thilo

+0

我把它放在我的罐子裏,然後從外面提取出來,它不起作用。類路徑是相對的lib/saxonTransformExtensions等 –

+0

我認爲我的xsl啓動了一個沒有添加類路徑的java進程。 –

回答

0

Eclipse項目中定義了一些依賴這不是標準JVM的一部分,否則你的Eclipse項目找不到com.intellgis類。

您需要通過設置CLASS_PATH環境變量或將它傳遞給java或javaw可執行文件來將這些jar添加到您的類路徑中。更多信息請參見可以在工具文檔還http://docs.oracle.com/javase/tutorial/essential/environment/paths.html

請參閱本http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html

+0

這就是我要求的,但我需要在xsl中添加classpath信息,因爲它啓動了一個不同的java進程。 –

+0

設置-classpath和添加CLASSPATH都不能修復錯誤 –