用osmosis解析osm文件的java错误

时间:2012-01-13 18:55:27

标签: java postgis openstreetmap

我正在尝试使用open street map的'osmosis'工具来解析osm文件并写入postgis数据库。

(如果它有用,我在ubuntu 11.10上运行它,我的系统上有oracle jdk 1.6)

这是我一直在尝试的事情。

[../package] $ ./bin/osmosis --read-xml file="../../../osm_dumps/africa.osm" --write-pgsql host=localhost database=osmosis_test user=chris
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.classworlds.Launcher
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.codehaus.classworlds.Launcher.  Program will exit.
[../package] $ ls -al /etc/alternatives/java
lrwxrwxrwx 1 root root 37 2012-01-12 19:16 /etc/alternatives/java -> /usr/lib/jvm/jdk1.6.0_30/jre/bin/java
[../package] $ java -version
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)

0 个答案:

没有答案