Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can QUARKUS use a generic library?

Tags:

quarkus

Can QUARKUS applications add generic library dependencies? (Eg Guava) Or do I have to create all dependencies as QUARKUS EXTENSION?

like image 641
NozTa Avatar asked Oct 17 '25 22:10

NozTa


1 Answers

If you run your Quarkus application on a regular JVM, all Java libraries should work as usual, and you can add them as regular dependencies.

It is when you enter the realm of AOT compilation to native binaries using GraalVM when things become interesting. Some Java libraries will work just fine without a single change, but a lot of Java libraries use features that are not supported in that environment; see https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md for details. If you hit those limitations, in the Quarkus context it's probably best to write an extension, because it nicely encapsulates everything you need to do to make the library work (be it reflection configuration, code substitutions, etc.)

like image 179
Ladicek Avatar answered Oct 22 '25 07:10

Ladicek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!