code-server: Java Extension Pack installs but does not work properly
code-serverversion: 1.604-vsc1.32.0- OS Version: Ubuntu 18.04, running in
systemd-nspawncontainer. - Extension: https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack
Description
When opening a Java file after installing the Java Extension Pack, the syntax highlighting works, but nothing else does - I don’t get the rocket as described on https://code.visualstudio.com/docs/java/java-tutorial.
I have verified that the same setup works on desktop (Linux) VS Code.
I have installed OpenJDK 11 inside the coder container.
Steps to Reproduce
- Install the Java Extension Pack from the marketplace
- Try opening any Java file. See that no syntax errors or info is shown.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 22 (6 by maintainers)
I had the same issue. I.e. just syntax highlighting and nothing else worked. Eventually, I did Ctrl+Shif+P -> Java: Clean the Java language server workspace. Everything started working. I have a project: simple main class with static main in subpackage + gradle wrapper + maven folders structure.
Will fix. Thanks for the report!
It works for me, thanks!
I did some experimenting with this using both the stock Coder image and the Dockerfile @adrianliechti posted above. There seems to be a couple separate problems to make this all work.
Java Extension Packdoesn’t install all the related plugins, but installing each individually is fine.Language Support for Java(TM) by Red Hat)plugin happy.After installing the plugins manually as per the Dockerfile above, I was still not able to get code completion. However at this point I was getting errors from the
Language Support for Java(TM) by Red Hatplugin. After solving these (in my case upgrading the gradle in my project from 2.4 to 5.1) I was able to get code completion.I ran into this issue also, and the above discussion pretty much points to the reason some work, some dont.
The specific plugins and order of install are not the issue, it appears to be installing from microsoft sources (aka @andrianliechti Dockerfile example) or from Coder’s marketplace (using code-server --install-extension or the in-app marketplace)
My guess is something is off in the coder copy.
also, hats off to @andrianliechti awesome work on that Dockerfile! Definitely stealing some ideas there!
I had try install both
Java Extension PackandLanguage Support for Java(TM) by Red Hatbut it still do not work. When I try any command and it showscommand 'java.open.serverLog' not foundSo, basically I cannot get anything work so far. I am using version1.792-vsc1.33.1Thanks @nyxcharon - manually installing the Java extension according to @adrianliechti 's Dockerfile and restarting code-server worked!! Thank you all!