0

I have been working on a Java project using Apache NetBeans for a long time now. Today I opened Apache Netbeans IDE, it started pretty normally the first time showing the "starting modules" screen, but soon after it just vanished. I restarted the IDE but a weird frame opened.

I opened the task manager and saw the IDE actually opened very first but then it goes to background process, after reopening it, it comes to the app section but doesn't work anyway:

The frame and the task manager

Instead there is a packed frame for some reason. It worked literally 4 hours ago, but suddenly this problem occurs don't know why. I didn't update the app or anything, I simply just turned off my laptop before.

I did reinstall JDK and Apache Netbeans IDE, but it didn't work. Same problem whatsoever. I did find some solution from this site, the solution was this-

Which JDKs did you try (have you configured it in \etc\netbeans.conf?) Have you deleted %USERPROFILE\AppData\Local\NetBeans\Cache\12.1 already? You can also try to delete %USERPROFILE%\AppData\Roaming\NetBeans\12.1. BTW: NetBeans 15 was released.

I tried to see this in my drive but there was nothing like 12.1 or something, it was just 15 in the \Local\NetBeans folder:

Local NetBeans folder

So I didn't know what to do. There are no videos related this problem on YouTube to look at, so I'm totally lost here. I don't know what I will do with study project if this IDE doesn't work.

I attached a picture of installed IDE and Java in case there is a problem related there:

Installed files

JDK Path Picture here

error content-

INFO [org.netbeans.core.netigso.Netigso]: bundle org.eclipse.osgi@3.9.1.v20140110-1610 started
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy resolver: Windows
INFO [org.netbeans.core.network.proxy.windows.WindowsNetworkProxy]: Windows system proxy resolver: auto detect
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy reloading succeeded.
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - mode: direct
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy: fell to default (correct if direct mode went before)
INFO [org.openide.awt.Toolbar]: Too long AWTTask: 1,597 ms for org.openide.awt.MenuBar$MenuBarFolder@50c08c7f(FolderList{MultiFileObject@21ee08d1[Menu]})
INFO [org.netbeans.ui.metrics.laf]: USG_LOOK_AND_FEEL
SEVERE [global]
java.lang.IllegalArgumentException: Key contains code point U+0000
    at java.prefs/java.util.prefs.AbstractPreferences.get(AbstractPreferences.java:291)
    at java.prefs/java.util.prefs.AbstractPreferences.getBoolean(AbstractPreferences.java:526)
    at org.netbeans.core.windows.TopComponentTracker.load(TopComponentTracker.java:76)
    at org.netbeans.core.windows.PersistenceHandler.load(PersistenceHandler.java:101)
    at org.netbeans.core.windows.WindowSystemImpl.load(WindowSystemImpl.java:56)
    at org.netbeans.core.GuiRunLevel$InitWinSys.run(GuiRunLevel.java:200)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
[catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
INFO [org.netbeans.core.CLIOptions2]: EQ stuck in Thread[#61,AWT-EventQueue-1,6,main]
org.netbeans.core.CLIOptions2$EQStuck: GUI is not responsive
    at java.base@19.0.1/jdk.internal.misc.Unsafe.park(Native Method)
    at java.base@19.0.1/java.util.concurrent.locks.LockSupport.park(LockSupport.java:371)
    at java.base@19.0.1/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:506)
    at java.base@19.0.1/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3744)
    at java.base@19.0.1/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3689)
    at java.base@19.0.1/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1625)
    at java.desktop@19.0.1/java.awt.EventQueue.getNextEvent(EventQueue.java:565)
    at java.desktop@19.0.1/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:190)
    at java.desktop@19.0.1/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop@19.0.1/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop@19.0.1/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop@19.0.1/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[catch] at java.desktop@19.0.1/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
WARNING [org.netbeans.core.CLIOptions2]: #198918: will not hard restart EQ when running on JDK 7
INFO [org.netbeans.core.CLIOptions2]: EQ stuck in Thread[#66,AWT-EventQueue-1,6,main]
org.netbeans.core.CLIOptions2$EQStuck: GUI is not responsive
    at java.base@19.0.1/jdk.internal.misc.Unsafe.park(Native Method)
    at java.base@19.0.1/java.util.concurrent.locks.LockSupport.park(LockSupport.java:371)
    at java.base@19.0.1/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:506)
    at java.base@19.0.1/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3744)
    at java.base@19.0.1/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3689)
    at java.base@19.0.1/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1625)
    at java.desktop@19.0.1/java.awt.EventQueue.getNextEvent(EventQueue.java:565)
    at java.desktop@19.0.1/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:190)
    at java.desktop@19.0.1/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop@19.0.1/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop@19.0.1/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop@19.0.1/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[catch] at java.desktop@19.0.1/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
WARNING [org.netbeans.core.CLIOptions2]: #198918: will not hard restart EQ when running on JDK 7
  • The single most likely cause of your inability to start NetBeans is that it can't locate a version of Java to run itself. The path to the version of Java it will use is defined in a file named **netbeans.conf** in the **etc** directory under your NetBeans installation directory. Locate and open that file in a text editor. Look for a line similar (but almost certainly different) to mine: **netbeans_jdkhome="C:\Java\jdk-20"**. Make sure that the path within the double quotes specifies the version of Java you want NetBeans to use. Save your change and restart NetBeans. – skomisa May 01 '23 at 16:54
  • ...If that doesn't work, or you believe that the path is already correct, then: [1] Locate the NetBeans log file. See [NetBeans - where to find the IDE log?](https://stackoverflow.com/q/50462124/2985643) for details on that [2] Try to run NetBeans. It will fail. [3] Open that log file in a text editor, and go to the end. Update your question with the error content that is written to the log file when you tried to run NetBeans. – skomisa May 01 '23 at 17:00
  • I believe the path is correct, the path showed exactly the path where I installed JDK 19. So I tried to update my question with the error content. The message log was pretty long. I didn't know which portion should I update, so I updated last portion. I think you can help me with that. Please check the question again. – Newbie_programmer May 01 '23 at 18:10
  • I see a couple of possible issues: [1] That error _"IllegalArgumentException: Key contains code point U+0000"_ can mean that NetBeans is trying to read some text file that contains "\u0000", where that is either meaningless or invalid. (e.g. In XML files). See the answer to [Cannot run Apache Netbeans 11 using JDK 11](https://stackoverflow.com/q/57084144/2985643) for more information. – skomisa May 01 '23 at 21:54
  • [2] The path to your JDK in **netbeans.conf** is **D:\Software Installation\Java**, which might not be valid. If it is correct then there should be directories directly under it named _bin_, _conf_, _include_, etc. If you do see those then it is probably fine, but if not you need to change that path to point to your JDK. As a related matter, what version of Java are you using, and can you access it from a command window (i.e. If you just submit `java -version` from the command prompt, what happens?) – skomisa May 01 '23 at 21:59
  • Thanks for the help. You literally saved my study project! The Java version was fine, the problem was that IllegalArgumentException blah blah. I used the solution from the post link you gave me. I would give an upvote to you but seems like there is no option. I will update the post with the solution so that others can use it. Thanks again. – Newbie_programmer May 02 '23 at 02:15
  • Also, while it looks like you had nulls in some text file(s) read by NetBeans, I don't know how/why that occurred. Inserting nulls in a text file rarely happens by accident, so I'm pretty sure it was nothing you did. My guess would be the reinstall (_"I did reinstall JDK and Apache Netbeans IDE"_), but you only did that after you had problems, so that isn't a completely satisfactory explanation. – skomisa May 02 '23 at 03:06
  • And yeah, I'm positive that I didn’t add any nulls in any text file, I don't have any idea how it got there. Well, at least it's working thanks to you! – Newbie_programmer May 02 '23 at 03:56

1 Answers1

0

Update and Solution

FINALLY got the answer all thanks to skomisa.

Whatever the issue was, to solve it, I deleted all of the preference files for NetBeans 15 by deleting the entire folder in AppData. That means just simply delete the folder located-

C:\Users"User Name"\AppData\Roaming\NetBeans\15.0 (the version you're using)\

Just delete the entire 15.0 folder and restart NetBeans. It will work for sure! Unless there are some other java version problems. Also, AppData folder is hidden so make sure to unhide the files first if you can't find AppData.