Remove dependency on redhat.java
Would it be possible to use this extension with language server from Oracle.oracle-java extension instead of redhat.java?
Hi @PavelCibulka, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
The Java Test extension currently relies on the Red Hat Java Language Server (redhat.java) for full test discovery and execution. There is no out-of-the-box support for Oracle’s LSP (oracle.oracle-java).
Suggestions:
-
The hard dependency on redhat.java was removed in vscode-java-dependency PR #322 (https://github.com/microsoft/vscode-java-dependency/pull/322), but you’ll still need a Java LSP server. The recommended approach is to install the Java Extension Pack, which activates redhat.java promptly: • https://github.com/microsoft/vscode-java-dependency/issues/543#issuecomment-909353987 • https://github.com/microsoft/vscode-java-dependency/issues/543#issuecomment-909802954
-
If you’re exploring alternative LSPs, note that overlapping extensions often clash. In redhat-developer/vscode-java issue #4034 a user tried removing oracle.oracle-java in favor of redhat.java to improve startup: • https://github.com/redhat-developer/vscode-java/issues/4034#issuecomment-2894822284
Currently no supported configuration lets the Java Test extension run solely on Oracle’s LSP. If you’d like to pursue this, please open an enhancement request in the repo.
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!