0

I want to stop using the local .jar library files I'm using in the Java files and want to import them by the online repository with gradle dependency.

I do the import but for some reason, the Java files do not recognize the library and can't compile my code after it.

for example: library "flexjson" was in my local on the jar file. and now changed the Gradle dependency to import it.

enter image description here

but for some reason my java stop recognize the library after I removed the jar lib in my local.

enter image description here

Guy Cohen
  • 21
  • 4
  • while it is generally possible, this is not how (standard) java compilers work: https://stackoverflow.com/q/14247716/592355 (they *all* (+build tools) need (cache) local files) ;( – xerx593 Nov 16 '22 at 14:01
  • @xerx593 Both Gradle and Maven encapsulate their local caches of dependencies, so the developer doesn't usually need to worry about that. – E-Riz Nov 16 '22 at 14:13
  • I'm assuming you ran the build using Gradle, right? Not just a `javac` command. – E-Riz Nov 16 '22 at 14:14
  • But i think, developer: "...removed the jar lib in my local.", @E-Riz (and now expects his IDE to compile) – xerx593 Nov 16 '22 at 14:16
  • Yes, I build using gradle. I thought that I can use them as imports when I add them as dependency to gradle – Guy Cohen Nov 16 '22 at 14:50
  • What IDE are you using? Is it aware of the Gradle dependencies? – E-Riz Nov 16 '22 at 20:47

0 Answers0