How to setup a Java Language Server with Qt Creator?

Viewed 224

I can't find any information about the way I should configure the Java Language Server in Qt Creator (for android development, if it matters). I've found two repos with the language servers: by @georgewfraser and eclipse, but I have no idea how to set them up.

I've tried to follow this instruction, but it doesn't work neither.

Is it possible to setup a java language server in Creator? I know that it is possible for Python, but I can't find any information about Java.

1 Answers

I am currently configuring Qt for Android. To add a Java language server to the Qt Creator IDE:

  1. Add a new Java language server in the Qt Creator IDE (Tools > Options > Language Client > Add > New Java Language Server) (follow this guide).
  2. Download the latest release of equinox launcher (for me, it was 4.21).
  3. Open ‘plugins’ subdirectory in the downloaded archive and search for org.eclipse.equinox.launcher_version.jar (in my case, it was org.eclipse.equinox.launcher_1.6.300.v20210813-1054.jar).
  4. Copy this file into the directory of your preference. You can rename it like ‘startup.jar’.
  5. Set up the path in the Qt Creator IDE (Tools > Options > Language Client > Add > New Java Language Server) to this equinox launcher file and click 'Apply'.

I need to test this solution as I am just starting my mobile project. I will update my response in case my solution does not work.

Read more about equinox launcher at https://wiki.eclipse.org/Equinox_Launcher

Related