0

I'm using org.openide.util.Lookup as a standalone library in an application (not a NetBeans Platform Application).

Everywhere I look it says that you can get rid of META-INF/services entries from old classes that used the @ServiceProvider annotation by doing a Clean and Build, but no matter how many times I Clean/Clean and Build/restart NetBeans/reboot the computer it still remembers the old annotations. I even looked through a ton of config files to see if it was caching the references somewhere.

The only way I have found that works is to create a fresh project and never delete or refactor any class after adding the @ServiceProvider annotation to it. This gets HIGHLY frustrating.

Does anyone know the magic bullet for getting these old class references out of the generated META-INF/services files?

Angie
  • 115
  • 1
  • 2
  • 10

1 Answers1

0

I'm not entirely sure this is what happened to you, but I had a similar issue with deleted menu items still appearing in layer.xml. I found out the solution was to do a clean build, close Netbeans (assuming that is the IDE your using), then go to C:\Users\my Username\AppData\Local\NetBeans\ or its equivlent, and deleting the Cache folder. Let me know if this works if you ever get to it.

BrainStorm.exe
  • 1,565
  • 3
  • 23
  • 40