简体   繁体   English

如何解决找不到或加载主类错误?

[英]How to solve could not find or load mainclass error?

I am getting this error if I add new component to my frame if I remove it then it works.如果我将新组件添加到我的框架中,如果我删除它,我会收到此错误,然后它就可以工作了。

I done this troubleshooting我完成了这个故障排除

(1)deleting index folder and restart computer and netbeans (1)删除index文件夹,重启电脑和netbeans

(2)increased heap size in conf file (2)增加conf文件中的堆大小

(3)set environment variable in windows system as (3)在windows系统中设置环境变量为

  :-User variable name = CLASSPATH
  :-variable value = C:\Program Files (x86)\Java\jdk1.8.0_40\bin;C:\Program Files (x86)\Java\jre1.8.0_40\bin;.

  :-System variable name :-Path

  :-System Variable value:-C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Java\jdk1.8.0_40\bin;C:\Program Files (x86)\Java\jre1.8.0_40\bin 

but the problem persists但问题仍然存在

if i add new component(radiobutton,label,scrollpane) it gives me this error:如果我添加新组件(radiobutton、label、scrollpane),它会给我这个错误:

在此处输入图片说明

With Java 11 you can start a class from the terminal with使用 Java 11,您可以从终端启动一个类

java classname.java java类名.java

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:找不到或加载主类Mainclass - Error: Could not find or load main class Mainclass maven-jar-plugin mainClass-无法找到或加载主类 - maven-jar-plugin mainClass - Could not find or load main class 如何解决在 spring 引导时找不到或加载主 class 错误? - How to solve could not find or load main class error with spring boot? 如何解决无法找到或加载主类? - How to solve Could not find or load main class? 如何解决:无法找到或加载主class org.testng.Converter; eclipse 中的错误? - How to solve :Could not find or load main class org.testng.Converter; error in eclipse? 如何解决“无法找到或加载主 class robocode.robocode”错误? - How to solve the 'could not find or load main class robocode.robocode' error? 如何解决在 Java oop 中找不到或加载主类? - How to solve Could not find or load main class in Java oop? 如何解决Eclipse工作区中的“无法找到或加载主类..” - How to solve "Could not find or load main class.." in Eclipse workplace Java:如何解决“无法加载主类”的错误 - Java: How to solve error for 'Could not load main class' 我该如何解决406错误“找不到可接受的表示形式”? - How can i solve the 406 error, “Could not find acceptable representation”?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM