Cygwin上的tdbloader:java.lang.NoClassDefFoundError

时间:2011-05-22 16:36:33

标签: windows cygwin jena classnotfoundexception

我正在尝试在Cygwin上使用tbdloader(带有最新Java安装的Windows 7)。这是tbdloader文档:http://jenawiki.hpl.hp.com/wiki/TDB/Commands

这是我用来在我的机器上调用tdbloader的包装脚本:

#!/bin/bash
# Cygwin script to import large NT files in TDB.

CD /cygdrive/c/mypath/TDB-0.8.10
echo "TDB found. Setting path"
export TDBROOT=/cygdrive/c/mypath/TDB-0.8.10
export PATH=$PATH:$TDBROOT/bin

CD /cygdrive/c/mypath/ontodata/
echo "Running import..."
tdbloader --loc ./tdb ./datasets/large_file.nt

这是我得到的错误:

java.lang.NoClassDefFoundError: tdb/tdbloader
Caused by: java.lang.ClassNotFoundException: tdb.tdbloader
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: tdb.tdbloader.  Program will exit.
Exception in thread "main"

tdbloader在Mac和Linux上运行良好。

有什么想法吗?

Mulone

1 个答案:

答案 0 :(得分:3)

正如我在另一个答案中已经提到过的,问题分别是Linux和Windows中的:;类路径分隔符。有关详细信息,请参阅this FAQ,建议您调整脚本以包含cygpath