tdbloader on Cygwin: java.lang.NoClassDefFoundError

∥☆過路亽.° 提交于 2019-12-23 17:57:37

问题


I'm trying to use tbdloader on Cygwin (Windows 7 with the latest Java installation). This is the tbdloader documentation: http://jenawiki.hpl.hp.com/wiki/TDB/Commands

This is the wrapper script I'm using to call tdbloader on my machine:

#!/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

This is the error I get:

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"

The tdbloader works fine on Mac and Linux.

Any ideas?

Mulone


回答1:


As I already mentioned to you in another answer, the issue is the : and ; classpath separators in Linux and Windows respectively. See this FAQ for details, which suggests you should adapt the script to include cygpath.



来源:https://stackoverflow.com/questions/6089278/tdbloader-on-cygwin-java-lang-noclassdeffounderror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!