Hi! Happy New Year everyone :christmas_tree: How u...
# tornadofx
c
Hi! Happy New Year everyone πŸŽ„ How usable is java 11 branch of tornadofx? And is there a sample app somwhere? πŸ™‚
a
Do you want to use modularization feature or just run tornado on JVM 11?
c
preferably with modularization, but it is a toy project and I'll be happy for now if it runs and compiles on JDK 11. Note that I run openJDK, not Oracle.
a
Tornadofx runs fine on JDK 11, you just need a plugin to attach JavaFX, I am using official one: https://github.com/openjfx/javafx-gradle-plugin and everythings works fine.
c
Thanks, built and ran hello world. Seems to be working πŸ™‚ I wonder how hard would it be to set it up with Spring Fu. On to the documentation. Good luck, me πŸ™‚
a
In JDK 11+ JavaFX is just a library, so it is easy. But you should remember that jars loaded by the plugin are platform-specific, so your application won't work on other systems out of the box.
c
Don't care about that at this point, but will keep in mind for the future. Thank you
a
The gradle plugin takes care of the system specific jars for you.
If you are using Maven, you get this feature by the build system.
Bottomline, your application will work on all systems if you are using a build tool πŸ˜‰
a
Meaning you have to build for a particular system to run. I hope that in future we will have something like a stand-alone javafx installation or an automatic cache for JavaFX jmods.
c
Seems a bit painful for now, so I'm lucky that I'm backend dev πŸ™‚ Just building something for myself to play with and want to at least be somewhat aware of how client-side gui works πŸ™‚
a
I think it will be solved shortly. JavaFX was removed from JDK just few months ago.
m
c
@mikehearn I prefer to start with the basics. Graviton does seem like a very promising technology, though. I'm keeping an eye on it
m
yep, it was more a reply to the other alexander, about how there might be some single/unified installation mechanism in future
i'll be tackling a java 11 port soon so let us know if you hit issues. there's a jdk11 branch of tornadofx that fixes some issues
c
I'm using tornadofx's Jdk 10 branch, which as I understand is in fact JDK 11, or is there another 11 branch?
m
oh, that might be it
a
@mikehearn thanks for the link. If I understand correctly, it could solve another problem, namely running multiple applications inside one VM.
m
i want to reach that point. it doesn't do so today because the JVM lacks some useful isolation features, but it's getting there.
the first step is to ensure apps can be terminated cleanly
i'm chipping away at it. they already run in an isolated classloader. next step is to forcibly terminate threads if they don't shut down in time
i may end up forking the JVM a little bit to add the needed features
a
I do not need isolation, on the contrary, those applications are modules to the same framework. I just want a modular design for them
m
well, if you don't need isolation you can run multiple apps in one jvm easily. just classload them and off you go. the trick is that it won't be robust, as their internals will interfere.
so you want some isolation, but not so much that they can't interoperate or talk to each other
a
I can class-load them. I even can write a wrapper that starts them all at once, buy what I want is some kind of management and delivery system to manage modules. I don't want to do it by hand.
m
got it
yes, one of the features i plan to add to the graviton API is the ability to request that new maven modules are resolved and added to the classloader for the app. they would be kept up to date like apps are.
it's not much work now, given what i already have, and i need it for the showcase app i want to write anyway
that said, if you don't want to wait, the Maven Resolver library is quite easy to use.
i also plan to split the classloader+maven integration out into a separate library
e
@Czar Yes, the jdk10 branch is infact targeting jdk11. Will push the first RC early in January, everything I've been able to test so far seems to work great
πŸ‘ 2
a
@edvin So everything works without making any changes to the application using TornadoFX?
e
@abhinay I've only tested the test apps within the framework code, all of those seems to run fine
I will begin testing external apps next week. There will be changes, as we'll remove deprecated features etc, and some things had to change, but it's pretty minor stuff