脚本错误:线程"main"中的异常; java.lang.NoClassDefFoundError:org/codehaus/classwor lds/Launcher [英] Script Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classwor lds/Launcher

查看:171
本文介绍了脚本错误:线程"main"中的异常; java.lang.NoClassDefFoundError:org/codehaus/classwor lds/Launcher的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows XP中运行OpenStreetMap的Osmosis,以从较大的数据集中剪切数据的子集.在各种情况下,该程序要么挂起,要么给我以下错误:

I'm running OpenStreetMap's Osmosis in Windows XP to cut a subset of data from a larger set. In various incarnations, the program either hangs or gives me the following error:

C:\Documents and Settings\mmorisy\tools>osmosis.bat --read-xml enableDateParsing
=no file="us_zipcodes.osm" --log-progress interval="10" --bounding-box top=43.22
868195 left=-73.5981635 bottom=41.2283584 right=-69.814204 --write-xml file="mas
s_zipcodes.osm"
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classwor
lds/Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.classworlds.Launcher
        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: org.codehaus.classworlds.Launcher.  Program will
exit.

我觉得Java没有正确安装或配置,但是我安装了Oracle网站上使用最多的SDK,尽管可能有六种变种,但我无法弄清楚哪里可能出问题了.

I get the feeling that Java isn't properly installed or configured, but I have installed the most revent SDK from Oracle's website and can't figure out where else I might be going wrong, despite maybe half dozen variations.

推荐答案

您收到的错误暗示Java本身已正确安装,但找不到要运行的.class文件.

The error you're getting implies that Java itself is installed correctly, but it can't find the .class file it's trying to run.

猜测,osmosis.bat中的classworlds.jar文件的-jar或-cp(或-classpath)参数不正确.

At a guess, osmosis.bat has an incorrect -jar or -cp (or -classpath) argument to the classworlds.jar file in it.

这篇关于脚本错误:线程"main"中的异常; java.lang.NoClassDefFoundError:org/codehaus/classwor lds/Launcher的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆