Hi, i'm trying to inject javascript at runtime using

Vaadin 14 on javaEE

settings.addInlineFromFile(InitialPageSettings.Position.PREPEND,
“./js/my.js”, InitialPageSettings.WrapMode.JAVASCRIPT);

the file is placed into frontend/js/my.js

i receive this error: File ‘./js/my.js’ for inline resource is not available through the servlet context class loader.

Where do i have to load the js file ?

Thanks

addInlineFromFile loads the resource from classpath, so your js file should be put somewhere under src/main/resources