Skip to content

Java Language Support: 25-minute startup time until operational. #4034

@jackcomtw

Description

@jackcomtw

Java Language Support (LJS): 25-min startup & ignores disabled Gradle setting

This is a humble request. I really like VSCode, but I'm getting very frustrated with the Language Server for Java (LJS). This issue is severely impacting my work.
In addition to the 25-minute startup time I mentioned previously, I've encountered another problem:
Even though I have disabled Gradle functionality (e.g., set java.import.gradle.enabled to false), LJS seems to disregard this setting. It still attempts to load Gradle information and throws a "load gradle version error".
Could you please provide some assistance with these issues? Thank you very much.

Version Information:

Identifier: redhat.java
Version: 1.41.1
Last Updated: 2025-04-28, 17:53:19
Size: 164.50MB
Cache: 22.13MB

VSCode Settings.json

{
    "java.autobuild.enabled": false,
    "java.jdt.ls.androidSupport.enabled": "off",
    "java.trace.server": "verbose",

    "terminal.integrated.env.windows": {
        "JAVA_HOME": "D:\\tools\\java\\jdk-21.0.4.7-hotspot",
        "MAVEN_HOME": "D:\\tools\\maven\\apache-maven-3.8.4",
        "MAVEN_OPTS": "-Dmaven.resolver.transport=wagon -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true"
    },
    "java.configuration.maven.userSettings": "C:\\Users\\Z1103\\.m2\\settings.xml",
    "java.configuration.maven.globalSettings": "C:\\Users\\Z1103\\.m2\\settings.xml",
    "maven.settingsFile": "C:\\Users\\Z1103\\.m2\\settings.xml",
    "maven.executable.path": "D:\\tools\\maven\\apache-maven-3.8.4\\bin\\mvn",
    "maven.terminal.useJavaHome": true,
    "editor.formatOnSave": false,
    "java.format.enabled": false,
    "java.configuration.runtimes": [
        {
            "default": true,
            "name": "JavaSE-21",
            "path": "D:\\tools\\java\\jdk-21.0.4.7-hotspot"
        },
        {
            "name" :"JavaSE-24",
            "path": "D:\\tools\\java\\openjdk-24.0.1_windows-x64_bin\\jdk-24.0.1"
        },
        {
            "name": "JavaSE-1.8",
            "path": "D:\\tools\\java\\jdk1.8.0_181"
        }
    ],
    "[java]": {
        "editor.suggest.snippetsPreventQuickSuggestions": false
    },
    "jdk.jdkhome": "D:\\tools\\java\\jdk-21.0.4.7-hotspot",
    "jdk.project.jdkhome": "D:\\tools\\java\\jdk-21.0.4.7-hotspot",
    "java.jdt.ls.java.home": "D:\\tools\\java\\jdk-21.0.4.7-hotspot",
    "java.jdt.ls.vmargs": "-Djavax.net.ssl.trustStore=D:\\tools\\java\\jdk-21.0.4.7-hotspot\\lib\\security\\cacerts -Djavax.net.ssl.trustStorePassword=changeit -DXmx2G ",
    "spring-boot.ls.java.home": "D:\\tools\\java\\jdk-21.0.4.7-hotspot",
    "spring-boot.ls.java.vmargs": [
        "-Djavax.net.ssl.trustStore=D:\\tools\\java\\jdk-21.0.4.7-hotspot\\lib\\security\\cacerts",
        "-Djavax.net.ssl.trustStorePassword=changeit"
    ],

    "redhat.telemetry.enabled": true,
    "spring.initializr.defaultLanguage": "Java",
    "java.server.launchMode": "Standard",
    "java.jdt.ls.lombokSupport.enabled": true,
    "java.format.comments.enabled" : true,
    "java.completion.enabled": true,
    "java.completion.guessMethodArguments" :"auto",
    "java.import.maven.enabled": true, // 啟用 Maven 支援

    "java.import.generatesMetadataFilesAtProjectRoot" :false, 
    "java.configuration.updateBuildConfiguration": "disabled",
    "java.import.gradle.enabled": false,
    "java.import.gradle.wrapper.enabled" : false,

    "window.newWindowProfile": null,
    "debug.disassemblyView.showSourceCode": false,
    "editor.inlineSuggest.edits.showCollapsed": true,
    "git.openRepositoryInParentFolders": "always",
    "xml.server.preferBinary": true
}

Log :

!SESSION 2025-04-30 13:24:53.864 -----------------------------------------------
eclipse.buildId=unknown
java.version=21.0.4
java.vendor=OpenLogic
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_TW
Framework arguments:  --pipe=\\.\pipe\lsp-9eda882fc0d91a0113e63aa0f4ed6057-sock
Command-line arguments:  -data c:\Users\Z1103\AppData\Roaming\Code\User\workspaceStorage\3adf2c20fb8c80f40f40da720bf0cda2\redhat.java\jdt_ws --pipe=\\.\pipe\lsp-9eda882fc0d91a0113e63aa0f4ed6057-sock

!ENTRY org.eclipse.core.resources 2 10035 2025-04-30 13:24:56.962
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:24:58.984
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:24:59.707
!MESSAGE Started org.eclipse.buildship.core 265ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:24:59.709
!MESSAGE Started org.eclipse.m2e.core 0ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:24:59.714
!MESSAGE ProjectRegistryRefreshJob finished 3ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:00.573
!MESSAGE Main thread is waiting

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:00.734
!MESSAGE >> initialize

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:00.739
!MESSAGE Initializing Java Language Server 1.46.1.202504011548

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.696
!MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.698
!MESSAGE Non-Static Commands: [java.project.import, java.project.changeImportedProjects, java.navigate.openTypeHierarchy, java.project.resolveStackTraceLocation, java.edit.handlePasteEvent, java.edit.stringFormatting, java.project.getSettings, java.project.resolveWorkspaceSymbol, java.project.upgradeGradle, java.project.createModuleInfo, java.vm.getAllInstalls, java.edit.organizeImports, java.project.refreshDiagnostics, java.project.removeFromSourcePath, java.project.listSourcePaths, java.project.updateSettings, java.project.getAll, java.reloadBundles, java.project.isTestFile, java.project.resolveText, java.project.getClasspaths, java.navigate.resolveTypeHierarchy, java.edit.smartSemicolonDetection, java.project.updateSourceAttachment, java.project.updateClassPaths, java.decompile, java.protobuf.generateSources, java.project.resolveSourceAttachment, java.project.updateJdk, java.project.addToSourcePath, java.completion.onDidSelect]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.700
!MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.702
!MESSAGE Non-Static Commands: [java.intellicode.enable]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.704
!MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.706
!MESSAGE Non-Static Commands: [java.project.refreshLib, java.project.checkImportStatus, java.project.list, java.project.generateJar, java.project.getMainClasses, java.getPackageData, java.resolvePath]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.708
!MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.709
!MESSAGE Non-Static Commands: [java.codeAction.lombok.getAnnotations, java.codeAction.lombok]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.711
!MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.713
!MESSAGE Non-Static Commands: [java.maven.initializeSearcher, java.maven.searchArtifact, java.maven.addDependency, java.maven.controlContext]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.715
!MESSAGE Static Commands: [sts.java.addClasspathListener, sts.java.removeClasspathListener]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.717
!MESSAGE Non-Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.721
!MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.723
!MESSAGE Non-Static Commands: [sts.java.javadoc]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.725
!MESSAGE Static Commands: [sts.java.type]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.727
!MESSAGE Non-Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.729
!MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.731
!MESSAGE Non-Static Commands: [sts.java.javadocHoverLink]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.733
!MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.735
!MESSAGE Non-Static Commands: [sts.java.location]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.737
!MESSAGE Static Commands: [sts.java.search.packages, sts.java.search.types]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.739
!MESSAGE Non-Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.741
!MESSAGE Static Commands: [sts.java.hierarchy.supertypes, sts.java.hierarchy.subtypes]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.743
!MESSAGE Non-Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.745
!MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.747
!MESSAGE Non-Static Commands: [sts.java.code.completions]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.749
!MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.751
!MESSAGE Non-Static Commands: [sts.project.gav]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.753
!MESSAGE Static Commands: []

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.755
!MESSAGE Non-Static Commands: [vscode.java.checkProjectSettings, vscode.java.isOnClasspath, vscode.java.fetchUsageData, vscode.java.validateLaunchConfig, vscode.java.resolveInlineVariables, vscode.java.resolveClassFilters, vscode.java.resolveMainMethod, vscode.java.resolveClasspath, vscode.java.resolveBuildFiles, vscode.java.resolveMainClass, vscode.java.updateDebugSettings, vscode.java.resolveSourceUri, vscode.java.fetchPlatformSettings, vscode.java.buildWorkspace, vscode.java.startDebugSession, vscode.java.inferLaunchCommandLength, vscode.java.resolveElementAtSelection, vscode.java.resolveJavaExecutable]

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.808
!MESSAGE >> initialized

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.827
!MESSAGE RepositoryRegistryUpdateJob finished 1ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:01.870
!MESSAGE Importing Maven project(s)

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:02.157
!MESSAGE Workspace initialized in 330ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:02.188
!MESSAGE >> initialization job finished

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2025-04-30 13:25:05.919
!MESSAGE ClasspathListenerHandler executeCommand sts.java.addClasspathListener, [4017fec4-d496-4bb2-93ec-38ae1f994311]

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2025-04-30 13:25:05.927
!MESSAGE ClasspathListenerHandler addClasspathListener 4017fec4-d496-4bb2-93ec-38ae1f994311

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2025-04-30 13:25:05.931
!MESSAGE ClasspathListenerHandler addClasspathListener 4017fec4-d496-4bb2-93ec-38ae1f994311 => OK

!ENTRY java-debug 1 0 2025-04-30 13:25:06.010
!MESSAGE Starting com.microsoft.java.debug.plugin

!ENTRY org.eclipse.buildship.core 2 0 2025-04-30 13:25:11.303
!MESSAGE Could not load Gradle version information
!STACK 0
org.gradle.api.UncheckedIOException: Cannot download published Gradle versions.
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.downloadVersionInformation(PublishedGradleVersions.java:167)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.tryToDownloadAndCacheVersions(PublishedGradleVersions.java:151)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.create(PublishedGradleVersions.java:111)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersionsWrapper$LoadVersionsJob.run(PublishedGradleVersionsWrapper.java:73)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.net.SocketTimeoutException: Connect timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:546)
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
	at java.base/java.net.Socket.connect(Socket.java:751)
	at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
	at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:178)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:531)
	at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:636)
	at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
	at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:377)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1237)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1123)
	at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1675)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1599)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223)
	at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions.downloadVersionInformation(PublishedGradleVersions.java:164)
	... 4 more

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2025-04-30 13:25:12.708
!MESSAGE ClasspathListenerHandler executeCommand sts.java.addClasspathListener, [sts4.classpath.ZBroAGQa]

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2025-04-30 13:25:12.708
!MESSAGE ClasspathListenerHandler addClasspathListener sts4.classpath.ZBroAGQa

!ENTRY org.springframework.tooling.jdt.ls.extension 1 0 2025-04-30 13:25:12.708
!MESSAGE ClasspathListenerHandler addClasspathListener sts4.classpath.ZBroAGQa => OK

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:16.266
!MESSAGE >> build jobs finished

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:16.268
!MESSAGE >> registerWatchers'

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:16.274
!MESSAGE >> registerFeature 'workspace/didChangeWatchedFiles'

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:35.757
!MESSAGE >> java/validateDocument

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:36.046
!MESSAGE Reconciled 1. Took 0 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:36.259
!MESSAGE User canceled while collecting the document symbols.

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:37.478
!MESSAGE begin problem for /DataTransferRecordMapper.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:37.478
!MESSAGE 1 problems reported for /DataTransferRecordMapper.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:25:37.506
!MESSAGE Validated 1. Took 750 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:39:31.776
!MESSAGE Creating the Java project jdt.ls-java-project

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:39:31.896
!MESSAGE Finished creating the Java project jdt.ls-java-project

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:39:31.926
!MESSAGE Reconciled 1. Took 11 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:39:32.466
!MESSAGE Reconciled 1. Took 89 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:39:34.161
!MESSAGE begin problem for /CarTransferService.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:39:34.163
!MESSAGE 6 problems reported for /CarTransferService.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:39:34.613
!MESSAGE begin problem for /SystemStatusHandler.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:39:34.632
!MESSAGE 1 problems reported for /SystemStatusHandler.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:39:34.690
!MESSAGE Validated 2. Took 1083 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:42:31.743
!MESSAGE Clearing problems for /SystemStatusHandler.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:44:46.375
!MESSAGE Reconciled 2. Took 12 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:44:48.168
!MESSAGE begin problem for /CarTransferService.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:44:48.172
!MESSAGE 6 problems reported for /CarTransferService.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:44:48.279
!MESSAGE begin problem for /SystemStatusHandler.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:44:48.279
!MESSAGE 1 problems reported for /SystemStatusHandler.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:44:48.279
!MESSAGE Validated 2. Took 469 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:47:46.116
!MESSAGE Clearing problems for /SystemStatusHandler.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:48:59.979
!MESSAGE >> java/validateDocument

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:49:05.414
!MESSAGE >> java/validateDocument

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:49:06.787
!MESSAGE begin problem for /DataTransferRecordMapper.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:49:06.827
!MESSAGE 1 problems reported for /DataTransferRecordMapper.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:49:06.852
!MESSAGE Validated 1. Took 239 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:49:12.653
!MESSAGE Reconciled 1. Took 4 ms

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:49:12.760
!MESSAGE >> java/validateDocument

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:49:14.827
!MESSAGE begin problem for /CarTransferService.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:49:14.843
!MESSAGE 6 problems reported for /CarTransferService.java

!ENTRY org.eclipse.jdt.ls.core 1 0 2025-04-30 13:49:15.015
!MESSAGE Validated 1. Took 1179 ms

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions