Closed garyttierney closed 5 years ago
Hi @garyttierney ,
First of all, thank you for taking the time to report these issues, it's much appreciated. I've already updated the maven builds to use the mavenised OpenJFX builds and these seem to work on the recent JDKs but I'm not a gradle user so I rely on the community contributions for JITWatch's gradle support.
I'd happily to accept a PR to fix gradle support for recent JDKs.
It's probably time to drop Ant support and it may also be time to drop Java 7 support. With the new Java release cadence and performance improvements I can't imagine many performance-sensitive projects that would care to use JITWatch are stuck at 7.
This would also allow me to start refactoring parts of JITWatch with Java 8+ language features.
A fat jar distribution would also lower the barrier for new users.
I'm wary of modularising JITWatch. For most people this is a desktop app, not a library, and I've always tried not to make changes that raise the barrier to making contributions due to fighting the build system (hence the lack of maven central releases - I've wasted far too much time battling that).
Cheers,
Chris
Hey @chriswhocodes,
Thanks for the quick reply!
I did try to build via Maven first, but JavaFX wasn't on the compile classpath for some reason. I tried out the Gradle build instead and have been working through fixing that up.
I'd happily to accept a PR to fix gradle support for recent JDKs.
I'll send a PR shortly. I'm just working on getting a Maven build working locally under JDK 11 at the moment.
It's probably time to drop Ant support and it may also be time to drop Java 7 support. With the new Java release cadence and performance improvements I can't imagine many performance-sensitive projects that would care to use JITWatch are stuck at 7.
I realized there was no real reason that my changes shouldn't support 7, so I've left the support in for now and will leave support in my (upcoming) PR.
A fat jar distribution would also lower the barrier for new users.
I've got this working on a local tree at the moment. The generated fat jar includes the native artifacts for the OpenJFX builds on Windows, Linux, and Mac, so I agree that'd lower the barrier for usage quite a bit since it "just works" on JDK 11 by running java -jar ui-shadow.jar
I'm wary of modularising JITWatch. For most people this is a desktop app, not a library, and I've always tried not to make changes that raise the barrier to making contributions due to fighting the build system (hence the lack of maven central releases - I've wasted far too much time battling that
I agree. In fact, JITWatch is the only modular JavaFX application I've been able to package successfully with jlink
, since it's so lean on dependencies. It was a nice experiment :)
Currently the JitWatch UI doesn't compile under Java 11 (actually, since 9+, but those releases are EOL) because JavaFX is no longer shipped with the JRE or provided as an extension/"layer" over the JRE.
EDIT: inspecting the POM a little closer for the Maven builds, it should be as simple as updating from the early access OpenJFX builds to get that working again.
The solution to this seems to be adding a dependency on the newly published OpenJFX binaries that are available on Maven Central. Since these aren't available pre-11, you need to come up with another dependency resolution strategy based on the version of Java you're using. I have a local patch that does this at the moment.
build.gradle
build-jdk8.gradle
build-jdk11.gradle
This works quite well (though you may note there are some additional changes in there, like building a runtime image with
jlink
; I've writtenmodule-info
files for both modules and only compile them when under Java 11 onwards, you can drop most ofbuild-jdk11.gradle
if you don't want modularity).I can put together a pull request with some or all of these changes, but there are some remaining questions:
Some additional notes:
Using
jlink
means you can ship aJitWatch
bundle that comes with a pre-compiledhsdis
plugin, making it effectively one click to download and test out the sandbox.