Home > Blockchain >  Can you call Eclipse’s java formatter from the command line?
Can you call Eclipse’s java formatter from the command line?

Time:11-14

Is there a way to call the Eclipse Java formatting engine (which is also apparently used by the Red Hat VSCode Java extension) from the command line?

CodePudding user response:

Yes, you can run the Eclipse formatter from the command line using an Eclipse Java IDE package or the Eclipse SDK. See Eclipse help: Java development user guide > Tasks > Using the Formatter Application:

eclipse -noSplash -vm <path to virtual machine> -data <workspace> -application org.eclipse.jdt.core.JavaCodeFormatter [ OPTIONS ] <files>
  • Related