0

I am using NetBeans with TMC 1.5.0. Normally when I type code with incorrect syntax, there is a red squiggly line underneath the error. However, now when I type invalid code such errors do not appear. I have checked Tools > Options > Editor and everything seems to be correct there.

enter image description here

I feel like this has something to do with the editor not recognizing my main class correctly because when I browse main classes I get an initializing view, please wait ... message indefinitely.

enter image description here

I added the class directory as the main class but this still did not work.

edit: I am working through the mooc.fi java course. TMC beans is what they say to install on this https://www.mooc.fi/en/installation/netbeans/ page. I am on Netbeans with TMC 1.5.0 and I am using JAVA 8. . Attempted Solutions: I can manually enter the project name into the project explorer to compile the code but this still does not fix the issue of NetBeans not recognizing the main class for syntax errors. I also tried clearing the cache but this did not work either.

skomisa
  • 16,436
  • 7
  • 61
  • 102
  • Options --> Fonts and Colors --> Category: Error // Effects; Wave underline // Effect color: Red ??? – Old Dog Programmer Jul 31 '22 at 02:09
  • What is TMC? You can [edit] your question to clarify, and (if one exists) add a related tag. – andrewJames Jul 31 '22 at 02:13
  • The Options in Fonts and Colors (in my previous comment) could explain why the wavy red line isn't there. But, it doesn't explain the absence of an error flag in the left margin. – Old Dog Programmer Jul 31 '22 at 02:37
  • Can you check if 1) Your projects are really maven projects 2) Goto View > IDE Log after you try to Browse Main Class to see if there is any error printed. – asbachb Jul 31 '22 at 08:07
  • 1
    I don't think that the absence of reporting syntax errors is the core issue; that is just a symptom of your underlying concern which the the ominous _"initializing view, please wait"_ message. That has been a longstanding problem on NetBeans, and you could search SO for similar questions with that error. For example, try some of the solutions proposed for [Netbeans - Error: Could not find or load main class](https://stackoverflow.com/q/20034377/2985643), and update your question with solutions that didn't work. Also, update your question to specify your versions of Java and NetBeans. – skomisa Jul 31 '22 at 15:44
  • @James I just checked this and it seems to already be enabled. – Random Student Jul 31 '22 at 20:59
  • 2
    I see that you are using Java 8, but what version of NetBeans are you using? Note that the most recent versions of NetBeans (version 12.6 and later) do not support the use of Java 8. If you are running NetBeans 12.6 or later with Java 8 then your environment is invalid, and you have two options: [1] Upgrade to Java 11 or later. [2] Use an older version of NetBeans, such as 12.5. – skomisa Aug 01 '22 at 01:02
  • 1
    @Skomisa I deleted all instances of Java 8 and the appdata of tmcbeans and downloaded Java 11. This solved the issue and everything is working correctly now. Thanks. – Random Student Aug 01 '22 at 23:20
  • @RandomStudent OK. It's good that you solved your problem. Please consider posting an answer to your own question, since that is more helpful to the community than having resolution buried in the comments. Be sure to state the versions of NetBeans, Java and TMC in your answer. – skomisa Aug 02 '22 at 00:06

1 Answers1

1

Versions: NetBeans with TMC 1.5.0 Java: 8 In order to solve this issue, I deleted all instances of Java 8 and downloaded Java 11. I also deleted the Appdata folder of tmcbeans.