Runtime load views in Vaadin Flow Spring Boot App

For many reasons I have had to abandon OSGi in my Vaadin project.
With OSGi I was able to successfully load and unload views at will at runtime.
I have previously discussed this requirement on the Vaadin Discord channel and referred to the requirement to alter the classpath.
Being out of my depth in the classpath handling area, I looked and discovered

Is there a classpath expert out there prepared to look at the code and comment if it would be suitable for Vaadin views?
I have tried without success.
May I suggest it might be a good topic for PartIO.

I can say I’m an expert, but made some experimentation for dynamic class loading for the “Vaadin voice demo” where there are new classes are create and loaded dynamically. Didn’t use JCL, but just created my own class loader + tooling.

Basically what I had was Vaadin Component as super class and created new classes in memory and a helper Component to wrap everything nicely.

So yes, I think this approach should work as long as the the Component class is loaded by the same class loader (or parent class loader).

Hi Sami,
Very clever demo in the video.
Is the code the video works with your github repo GitHub - samie/porcupine-web-vaadin-demo: Example of using Picovoice Porcupine wake word detection in Vaadin 24 ?

Sami,
Your porcupine repo has no reference to classpath.
Have you made the code behind the video available publicly?

Oh yes, that code was only demonstrating the voice integration part. I think I might not published the dynamic memory classpath implementations in GitHub. Probably for a good reason :smiley: … I’ll take a look. Also JCL looks promising, so that might be worth checking bit more.