0

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

(2)increased heap size in conf file

(3)set environment variable in windows system as

  :-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:

enter image description here

thor
  • 21,418
  • 31
  • 87
  • 173

2 Answers2

1

you can try Clean and build your project, if it doesn't work, you can check the posts from
Netbeans - Error: Could not find or load main class ,
Error: Could not find or load main class (netbeans and java) or
What does "Could not find or load main class" mean?

Community
  • 1
  • 1
Vishal_Kotecha
  • 481
  • 5
  • 19
  • I attempted to rename my project and classes, got an error, attempted to name all back to the original, got this error. Following the first link provided the information to fix it. – Nate Lockwood Aug 01 '18 at 17:36
0

With Java 11 you can start a class from the terminal with

java classname.java

SJX
  • 1,071
  • 14
  • 15