如何解决此Java类未找到异常? [英] How do I resolve this Java Class not found exception?

查看:743
本文介绍了如何解决此Java类未找到异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试运行Java应用程序,但遇到此错误:

I am trying to run a Java application, but getting this error:

java.lang.ClassNotFoundException:

冒号后面的类的位置丢失。但是,我知道该位置不存在,因为类位于其他地方。如何更新该类的路径?

After the colon comes the location of the class that is missing. However, I know that that location does not exist since the class is located elsewhere. How can I update the path of that class? Does it have something to do with the class path?

推荐答案

您的类路径已损坏(这是一个非常在Java世界中的常见问题)。

Your classpath is broken (which is a very common problem in the Java world).

根据您启动应用程序的方式,您需要将参数修改为 -cp 条目在MANIFEST.MF或您的磁盘布局。

Depending on how you start your application, you need to revise the argument to -cp, your Class-Path entry in MANIFEST.MF or your disk layout.

这篇关于如何解决此Java类未找到异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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