Could not find the main class: *****.Program will exit

2024-06-02 19:08
文章标签 could main find class program exit

本文主要是介绍Could not find the main class: *****.Program will exit,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

今天在运行一个 java Application时突然出现一下对话框,并抛异常。



java.lang.NoClassDefFoundError: sy12/FrameQueryTest
Caused by: java.lang.ClassNotFoundException: sy12.FrameQueryTest
 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Exception in thread "main"

解决办法是:

由于我的磁盘合并过,原来的jdbc驱动所在的磁盘盘号变了,重新引入了驱动包,但原来的驱动包没删,所以出现了这个问题,把原来的包删了就好了。报的是找不到FramQueryTest的main函数,但实际上和这个没关系。  

这篇关于Could not find the main class: *****.Program will exit的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1024836

相关文章

Class 对象在执行引擎中的初始化过程

一个 class 文件被加载到内存中需要经过 3 大步:装载、链接、初始化。 装载 装载是指 Java 虚拟机查找 .class 文件并生成字节流,然后根据字节流创建 java.lang.Class 对象的过程。 链接 链接过程分为 3 步:验证、准备、解析。 验证: 初始化 这是 class 加载的最后一步,这一阶段是执行类构造器方法的过程,并真正初始化类变量。 1.文件格式检验:检

Program-of-Thoughts(PoT):结合Python工具和CoT提升大语言模型数学推理能力

Program of Thoughts Prompting:Disentangling Computation from Reasoning for Numerical Reasoning Tasks github:https://github.com/wenhuchen/Program-of-Thoughts 一、动机 数学运算和金融方面都涉及算术推理。先前方法采用监督训练的形式,但这种方

【Linux系列】find命令使用与用法详解

💝💝💝欢迎来到我的博客,很高兴能够在这里和您见面!希望您在这里可以感受到一份轻松愉快的氛围,不仅可以获得有趣的内容和知识,也可以畅所欲言、分享您的想法和见解。 推荐:kwan 的首页,持续学习,不断总结,共同进步,活到老学到老导航 檀越剑指大厂系列:全面总结 java 核心技术,jvm,并发编程 redis,kafka,Spring,微服务等常用开发工具系列:常用的开发工具,IDEA,M

Leetcode 3195. Find the Minimum Area to Cover All Ones I

Leetcode 3195. Find the Minimum Area to Cover All Ones I 1. 解题思路2. 代码实现 题目链接:3195. Find the Minimum Area to Cover All Ones I 1. 解题思路 这一题还是挺简单的,只要找到所有1所在的元素的上下左右4个边界,作为目标矩形的四个边即可。 2. 代码实现 给出python

「Debug R」报错unable to find an inherited method for function是如何产生的

在一个群里看到这样一条报错,截图如下: 报错信息 当然这种问题解决起来也很快,无非就是把报错信息复制出来放在搜索引擎上,只不过你要挑选合适的搜索引擎。 百度 谷歌 必应 解决方案就是用dplyr::select。 虽然报错解决了,但是我还想着要重复出这个报错。因为只有能重复出报错,才能证明你不是运气好才解

在eclipse中进行nutch1.7二次开发通过ant编译build.xml出现Class not found javac1.8

把nutch1.7通过svn导入到本地后打算进行二次开发却在开始用ant进行build.xml构建的时候出现Class not found javac1.8 暂且不管哪个sonar没有找到的问题,我们先把那个Class not found :javac1.8的问题: 多半是因为Ant版本太低,低于1.9,无法和java1.8兼容,因为我的java运行环境是1.8的,Ant版本也是1.8,所

apache环境配置 | httpd Could not reliably determine the server's fully qualified domain name

前言 作为php开发者,你是否遇到这种情况。经常我们会在Linux系统上通过php do.php命令进行程序调试。有时候明明通过命令行方式调试程序成功后,却发现在浏览器请求我们的www.test.com/../do.php却不能够成功执行,报500错误。 这时候执行service httpd restart重启web服务 启动apache遇到错误:“Starting httpd: http

Failed to load the JNI shared library D:\Program Files\Java\jdk1.5.0_08\bin\..\jre\bin\client\jvm.d

原因是 (外形类型向日葵) eclips要求jdk最低的版本为1.7以上

[leetcode] 515. Find Largest Value in Each Tree Row

Find Largest Value in Each Tree Row 描述 You need to find the largest value in each row of a binary tree. Example: Input: 1/ \3 2/ \ \ 5 3 9 Output: [1, 3, 9] 我的代码 简单的dfs。 要使

springcloud config报错NoSuchLabelException: No such label: main

目录 一、问题描述二、解决方法 一、问题描述 Spring Cloud Config Server 编译报错:NoSuchLabelException: No such label: main org.springframework.cloud.config.server.environment.NoSuchLabelException: No such label: ma