6

I was working with a big project on Netbeans. I attached some source code on third party library and all went smooth. Today I have the following popup message (I already had seen before obviously):

The file [...] cannot be safely opened with encoding windows-1252. Do you want to continue opening it?

The two buttons, yes and no, are not responsive. If I close the popup with the red cross it does nothing after a 1 sec loading. Is there a way to "clean" the open file in the netbeans workspace to avoid this error?

SO Windows 8.1, Netbeans 8.0.2

Thanks.

Vladislav Povorozniuc
  • 2,149
  • 25
  • 26
Razlo3p
  • 455
  • 2
  • 7
  • 28
  • 1
    Possibly you are running into this bug: https://netbeans.org/bugzilla/show_bug.cgi?id=200398 – Gimby Oct 19 '15 at 08:32
  • it's a bit different, since i cannot do nothing while this popup is up. I cant even close NetBeans, i have to kill process. so i have no access to log or other hint – Razlo3p Oct 19 '15 at 08:43
  • 1
    What can I say: that's pretty much buggy behavior of the IDE. At this point try Netbeans 8.1.RC2 to see if that changes anything, and if not consider making a bug report. SO is not really the place for support with tooling misbehavior, that is still better suited for the support lines of the product you're using. – Gimby Oct 19 '15 at 08:50
  • Thanks, i will procede as you suggest! I thought other user had similar issue. furthermore i was asking if there is a way to "clean" the netbeans opened (like a config file for the workspace or similar) to workaround the issue and "disable" the loading of the source file that is giving me trouble. – Razlo3p Oct 19 '15 at 08:53
  • Yes but that's too non-specific. At this point it isn't even clear which file Netbeans is falling over, or why. Perhaps it is a specific plugin that is borking, perhaps it is a specific project setup type. All unclear. – Gimby Oct 19 '15 at 09:00

3 Answers3

13

One general solution to this kind of problem can be to clear the netbeans cache.

Quit NetBeans and find the cache folder - mine is at C:\Users\OldCurmudgeon\AppData\Local\NetBeans\Cache. Delete the whole folder - this can take a while as there can be a lot of files in there.

Netbeans will create a new one on next start.

Note that this will slow down netbeans for a while but it won't be long before it is back up to speed again.

OldCurmudgeon
  • 64,482
  • 16
  • 119
  • 213
  • 2
    Still not Solved unfortunately, it still ask me to load that file (i omitted the name in my answer but is a .java). Thansk – Razlo3p Oct 19 '15 at 09:10
  • I didn't have problems loading my projects but this solution has speeded up the load time from 30 sec + to about 5 seconds. The cache folder had a previous version of netbeans in there too which might have been the issue but i just deleted the whole cache folder and let netbeans recreate it. Thanks – Rob Sep 25 '19 at 10:37
  • Be sure to look at the next Answer (from Pichet J.). – DSlomer64 May 31 '20 at 09:19
10
  1. Quit NetBeans.
  2. go to the last Project folder then remove the project from the folder.
  3. Open NetBeans.
  • 2
    "Last Project Folder" contains The Project that is loading when NB freezes. "Remove The project from the folder" means to move The Project folder to a different node for later retrieval. So I'm moving folder up one node and starting NB 8.2, moving folder back to its proper place, opening that project... sonofagun, it's okay. Thanks. **But soon NB freezes**. OK... close NB, move The Project folder up a node, but **delete the cache** (at C:\Users\%UserName%\AppData\Local\NetBeans\Cache) per @Old Curmudgeon. Start NB, open The Project: no freeze. So the actual Answer is to apply **BOTH** Answers. – DSlomer64 May 31 '20 at 09:35
  • @DSlomer64 thanks so much for the clarification on Pichet's response! I needed to do these exact steps to get my issue to resolve. – lolynns Jul 09 '20 at 17:30
  • I hope it continues to work for you. The band-aid(s) I refer to didn't always do the trick. I wound up installing Netbeans 8.2 RC. I don't recommend that, though. It has problems, too. The problem is no more support for Netbeans below 9.0, whose release date is "TBD", four years after last update to 8.2, October 2016, and up against Netbeans 12 and above, where it says no more support for 8, 9, 10, 11 ... – DSlomer64 Jul 09 '20 at 23:51
1

I had a similar situation which started happening after I added a new project yesterday. I deleted the cache as someone recommended, but was still having the same issue. The solution was to rename the new project so it wouldn't be found. Everything worked splendidly after that.

Janin
  • 292
  • 1
  • 2
  • 7