[Qt-creator] Java support?

Eike Ziller Eike.Ziller at qt.io
Fri Sep 11 09:41:03 CEST 2020

> On Sep 10, 2020, at 20:21, Jason H <jhihn at gmx.com> wrote:
> I'm working in an Android/iOS app and while creator is just fine for iOS/Objective-C, QtCreator is not fine at all for Android/Java.
> I'm wondering how close QtCreator is to being able to:
> * present the java files and classes in the Project explorer (gradle integration?)

I don’t see gradle integration coming. When we’d finished it, Google would probably switch to something else :P
But you should be able to use a Generic Project for that: File > New > Import Project > Import Existing Project. (For the language server you should probably import the module base directory?)
That could probably be made more obvious… like not putting it at the end of a category with lots of version control related items, and calling it something like Import Directory or such (there doesn’t need to be a “project” of any kind).

> * parse and edit Java code
> I'm thinking the language server would do a lot of the heavy lifting?

The java-language-server would/should solve the “parse and edit” part.
I have not tried it, but probably setting it up as “Start Server per Project” is required, and probably having the module path as the base of the Qt Creator project.
Also, Qt Creator still has a specialized Java editor from the pre-LSP times, which might interfere with the language client, so switching the handler for text/x-java to “Plain Text Editor” in Preferences > Environment > MIME Types might be needed to.

I agree that someone should check this, potentially throwing the old Java editor away, and maybe Qt Creator can help a bit with setting up the Java language server too, similar to what we do for Python.

Br, Eike

Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Straße 10
D-12489 Berlin
eike.ziller at qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B

More information about the Qt-creator mailing list