0

I have a JavaFX project that I have been programming in NetBeans. I'm using a version of a JAR file in my libraries and a newer version has come out. I tried to remove the first version and then add the new version in by right clicking the Libraries and then clicking "add JAR/Folder." It adds just fine but then all my imports will not resolve to the new version. I get errors saying that the import can not be found and none of my methods that use that library can find their objects either. If I right click on the little yellow lightbulb on the left, normally I would get an "Add import for ________" But that doesn't even show up. Only "Create class ______ in _______." I know the actual objects haven't changed names and the imports are pointing to the right locations, none of those have changed either. If I add the old library back in it works fine.

Is there a way to update the library. Something like "Refactor to new JAR?"

Kfly
  • 27
  • 8
  • clean your project and then again add all the jars. – manikant gautam Oct 06 '19 at 02:49
  • Did you change from a version not requiring to do the proper module imports to one that does requiring you to do this? Do you use a `module-info.java` module definition for your own code? – fabian Oct 06 '19 at 09:26
  • Thanks for the input guys. I tried all different variations of the remove, clean, re-add imports etc... Nothing changed there. As far as I know. No. I did not change from one or the other. They should both require the imports. And no I do not use the module-info definition in my code. I did try to create an entirely new project with the new updated jar, and it didn't import appropriately either. So I'm starting to think there is a problem with the "Updated" jar. – Kfly Oct 08 '19 at 04:14
  • So it appears it's a bad version of the "updated" jar. I can go back to a version before the newest one, which is still newer then the old one I was using and it works just fine. Thanks for the help peeps! – Kfly Oct 08 '19 at 05:15

1 Answers1

0

After looking into it some more and doing some extensive trouble shooting. I figured out that the update was a bad file. By using a slightly earlier version of the jar file but still newer then the one I was using I got it to work. Guess I just need to wait for the developer of the "Update" to fix their file. Thanks guys

Kfly
  • 27
  • 8