vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

There is no document formatter for 'java'-files installed.

Open xriu opened this issue 8 years ago • 4 comments

There is no document formatter for 'java'-files installed.

Environment
  • Operating System: Xubuntu 18.04

  • JDK version: openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.18.04.1-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

  • Visual Studio Code version: 1.26.1 493869ee8e8a846b0855873886fc79d480d342de x64

  • Java extension version: 0.29

Current Result

I can't format any java files.

On output console I get the following error:

[Error - 12:59:23 PM] Connection to server is erroring. Shutting down server.
[Error - 12:59:23 PM] Connection to server is erroring. Shutting down server.

xriu avatar Aug 18 '18 11:08 xriu

Could you, please, attach your project?

snjeza avatar Aug 18 '18 19:08 snjeza

Sorry for late response, I don't remember how I fixed the problem, but I think just reinstalling vscode and their extensions again

xriu avatar Sep 01 '18 10:09 xriu

I had the same problem. It seems that there is a conflict with Java Checkstyle plugin. After I uninstalled this plugin, everything works fine again.

szaffarano avatar Dec 15 '18 15:12 szaffarano

I spent the whole day yesterday in the attempt to avoid the missing formatter for java files. Removing java checkstyle didn't help anyhow. Also deleted any vscode related folder and installed it from scratch, just Language support for java. Still the same issue.

Im now on:

  • win 10 pro 1809 (17763.292)
  • vscode 1.30.2
  • Language Support for Java(TM) by Red Hat Version: 0.37.0

any suggestion?

EDIT: additionally, after installing "prettifier" extension the default formatter worked, then I updated the url with the google code styles xml from here and now I got the same error again with any combination between the enable/disable default java formatter; optional formatter profile name and url or filepath to the eclipse formatter xml settings

stefanomiccoli avatar Jan 30 '19 13:01 stefanomiccoli