just starting java programming and when ever i start visual studio code gradle says it cant start gradle language server as seen in this picture:

[![this is what shows up ](https://i.stack.imgur.com/cADQt.png)](https://i.stack.imgur.com/cADQt.png)

it also throws out alot of horrible errors :

```
Oct 15, 2021 9:51:13 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
    at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
    ... 11 more
Caused by: java.lang.NullPointerException: Cannot read the array length because "<local3>" is null
    at com.microsoft.gradle.resolver.GradleLibraryResolver.searchInFolder(GradleLibraryResolver.java:161)
    at com.microsoft.gradle.resolver.GradleLibraryResolver.findCoreAPIWithDist(GradleLibraryResolver.java:152)
    at com.microsoft.gradle.resolver.GradleLibraryResolver.findCoreAPIWithWrapper(GradleLibraryResolver.java:140)
    at com.microsoft.gradle.resolver.GradleLibraryResolver.resolveGradleAPI(GradleLibraryResolver.java:89)
    at com.microsoft.gradle.GradleServices.applySetting(GradleServices.java:160)
    at com.microsoft.gradle.GradleLanguageServer.initialize(GradleLanguageServer.java:90)
    ... 16 more

[Error - 21:51:14] Server initialization failed.
  Message: Internal error.
  Code: -32603 
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
    at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
    ... 11 more
Caused by: java.lang.NullPointerException: Cannot read the array length because "<local3>" is null
    at com.microsoft.gradle.resolver.GradleLibraryResolver.searchInFolder(GradleLibraryResolver.java:161)
    at com.microsoft.gradle.resolver.GradleLibraryResolver.findCoreAPIWithDist(GradleLibraryResolver.java:152)
    at com.microsoft.gradle.resolver.GradleLibraryResolver.findCoreAPIWithWrapper(GradleLibraryResolver.java:140)
    at com.microsoft.gradle.resolver.GradleLibraryResolver.resolveGradleAPI(GradleLibraryResolver.java:89)
    at com.microsoft.gradle.GradleServices.applySetting(GradleServices.java:160)
    at com.microsoft.gradle.GradleLanguageServer.initialize(GradleLanguageServer.java:90)
    ... 16 more

[Error - 21:51:14] Starting client failed
  Message: Internal error.
  Code: -32603 
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
    at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
    ... 11 more
Caused by: java.lang.NullPointerException: Cannot read the array length because "<local3>" is null
    at com.microsoft.gradle.resolver.GradleLibraryResolver.searchInFolder(GradleLibraryResolver.java:161)
    at com.microsoft.gradle.resolver.GradleLibraryResolver.findCoreAPIWithDist(GradleLibraryResolver.java:152)
    at com.microsoft.gradle.resolver.GradleLibraryResolver.findCoreAPIWithWrapper(GradleLibraryResolver.java:140)
    at com.microsoft.gradle.resolver.GradleLibraryResolver.resolveGradleAPI(GradleLibraryResolver.java:89)
    at com.microsoft.gradle.GradleServices.applySetting(GradleServices.java:160)
    at com.microsoft.gradle.GradleLanguageServer.initialize(GradleLanguageServer.java:90)
    ... 16 more

```

i have tried everything i can think of to try and fix this but nothing seems to work any help would really be appriciated,
thank you in advanced