0

I want to run a gradle project but it is showing following error.

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int) WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

please help me

  • What went wrong: Execution failed for task ':bootRun'. A problem occurred starting process 'command 'C:\Users\ferdousi.jdks\corretto-11.0.10\bin\java.exe''
Ferdousi
  • 319
  • 5
  • 17
  • Everything on [this page](https://docs.groovy-lang.org/latest/html/api/org/codehaus/groovy/vmplugin/v7/Java7.html) seems to suggest you're using software that's dead. The message is telling you it's using mechanisms that soon will not work, which makes it deader. Time to upgrade to somethine newer. If the "Java7" class implies support for Java 7, that's getting old and smelly, too. Use JDK 8 or 11 (the long-term support versions). – user15187356 Mar 24 '21 at 03:25
  • Step 1: Learn the critical difference between warnings and errors. – chrylis -cautiouslyoptimistic- Mar 24 '21 at 04:19
  • @chrylis-cautiouslyoptimistic- this warinings cannot let me to run the project – Ferdousi Mar 24 '21 at 06:35
  • @user15187356 I edit my question please suggest me a solution to run the project – Ferdousi Mar 24 '21 at 06:36
  • Since this is tagged with IntellJ: does this imply the error only happens when running with IntellJ - or do you get a better error when running in a terminal? The **WARNING** are most likely not your problem here - the real problem follows after the warnings. Run the project like it's most likely suggested anyway from from the failing gradle run with flags that show you more about the real problem (e.g. `-i -s`) – cfrick Mar 24 '21 at 06:57
  • The warnings are JDK 11 telling you that the code you're using is doing things that **are not allowed** and which **will not continue to work** in some future version. At the same time, you are using components **which are documented as obsolete**. So what to do about it? (1) Ignore the warnings, or (2) update those components. – user15187356 Mar 24 '21 at 11:45
  • For now you can apparently use `--illegal-access=permit`. [See this link](http://openjdk.java.net/jeps/261#Relaxed-strong-encapsulation), but you should be aware that your code has no future. – user15187356 Mar 24 '21 at 11:49
  • Related: https://stackoverflow.com/questions/50251798/what-is-an-illegal-reflective-access – user15187356 Mar 24 '21 at 11:50

0 Answers0