FontAwesome icons in CUBA 6.9

Similar question (Cuba Platform 6.9)

I tried to use IconSets as in:

I downloaded tree set of flags icons, generated via awk tree ENUMS as in documentation for different image dimensions:

– Code Snippet –

package pro.sysonline.contacts.gui.icons;

import com.haulmont.cuba.gui.icons.Icons;

public enum flagsWorldMini implements Icons.Icon {

    /* Flag Images */

– Code Snippet –

put images in module gui/$project/icons where enumerations resides
and configured three enumeration with application and web application properties

in main Cuba Studio project window.

cuba.iconsConfig = +pro.sysonline.contacts.gui.icons.smallIcon +pro.sysonline.contacts.gui.icons.bigIcon

but web application does not start.

I put only one of three enumerations, application starts but icons are not found. (used in a linked button or in a metod to show image near enumeration in a drop-down list)

Any help will’be appreciated.

Thank you in advance,


Please use </> button on editor panel or ``` for code blocks. Do not paste - Code snippet -.

Hello @f.demassis

To use icons that are located in source code of the project you should specify source of icons as classpath resources in the following way: classpath:/path/to/your/icon/from/root/icon.png.

Or you can create a folder named icons under the sources root and put icons there. It allows you to use the following icon sources:


To use icons/*.png like paths you should extend a theme that you use and put icons into modules/web/themes/theme_name/icons/.

I’ve prepared small demo projects where you can find all described approaches. (10.6 MB)



Hello @tsarev I tried first solution and works great!!!

Thank you very much.


I do not know what appened but Assembling project I get this error:

import com.haulmont.cuba.gui.icons.Icons;
/home/demassis/studio-projects/Contacts/modules/web/themes/halo/icons/ error: package Icons does not exist
public enum flagsWorldMini implements Icons.Icon {
/home/demassis/studio-projects/Contacts/modules/web/themes/halo/icons/ error: method does not override or implement a method from a supertype

Icons are in path as in your example and correctly configured in

cuba.iconsConfig = +pro.sysonline.contacts.web.icons.icons

Application regurarly starts and works including icon display.

I tried gradle from command line, same problem.
It seems like it can’t find interface class. I did not extracted it from downloaded jars

Cuba Studio release: 6.10.2

CUBA Studio
Version 6.10.2
Built on 2019-01-09 11:43:17

Platform: platform-6.10.7

Not critical just to see if its not a bug.

Thank in advance,

Hello @f.demassis

It is very strange that your icon set ( is located in themes directory.

Moreover the cuba.iconsConfig property should be equal to fully qualified name of your icon set, not only its package.

Ok I’ll try to modify it.
So could it be a classpath problem?

It does not seem to find framework package. Is there some configuration that influence classpath?

Thank you,

It’s hard to say what exactly wrong in your case without sources. There is no any configuration that can influence classpath, and I think that the reason is not a wrong classpath.

OK, I’’ try to solve and let you know.


Hi, I moved out icons folder from theme directory and changed package name from:


now it compile perfectly.
Probably it was my misunderstanding of project includes in this post.

Thank you,

1 Like