Is there an easier way to "fix" a control instead of building everything (i.e., java, native, etc.)?
John Hendrikx
john.hendrikx at gmail.com
Wed Jul 23 15:32:45 UTC 2025
For investigating a bug, what I usually do is copy the
control/skin/class/etc in question into my current project, leaving it
in its original package. This effectively overwrites that class,
allowing you to make edits to it (like adding debug prints, or altering
calculations). This works pretty easily as long as the project is
non-modular; with modular projects you may need to add command line
options. For most of my investigations, I keep things simple and just
use a non-modular project. I've debugged many controls, layout issues
and CSS code this way in the past, without having to run the JavaFX
build at all, allowing for almost instant feedback.
So for example, you have something you want to investigate in BorderPane
(my most recent exploit). Go to the class, copy the whole code, paste
it into your project (my IDE will automatically place it in its original
package). Now the code is editable. Make your test changes, run the
project, and see if they improve the situation. I generally do this
with Maven projects, and a class provided by the main artifact will
override anything provide by a dependency.
--John
On 23/07/2025 15:34, Kevin Rushforth wrote:
> [redirecting to openjfx-dev]
>
> You will need to build all of JavaFX using gradle.
>
> You might be running into an issue with the version of Xcode you are
> using. You will need macOS 14 or 15 with a recent version of Xcode. We
> use Xcode 15.4 for our production builds.
>
> Can you list the version of macOS and Xcode you are using? And
> copy/paste the specific error message(s) you see?
>
> -- Kevin
>
>
> On 7/22/2025 8:21 PM, Paul Furbacher wrote:
>> I want to investigate fixing what I consider a bug or deficiency in a
>> particular control in the easiest manner possible.
>>
>> Initially, I thought to just build everything, but that hasn’t worked
>> because I run into an issue with native compilation, notably in
>> “:graphics:ccMacGlass”.
>>
>> Instead of battling gradle to build the whole shebang, it seems to me
>> it would be much quicker to simply patch an existing distribution.
>> Browsing “build.gradle”, nothing jumps out at me.
>>
>> Is it possible to just patch a published distribution with a “fixed”
>> javafx.controls jar?
>>
>> (Leave jmods out of the picture for the moment because I’ll initially
>> use javafx on the classpath. If my idea of a fix pans out, then I’d
>> proceed with filing a bug report with suggested changes, and maybe
>> doing a pull request — that’s for later.)
>>
>> If that’s not possible, I might be back here asking for help
>> diagnosing what’s causing clang to finish with a non-zero exit value
>>
>>
>> Regards,
>>
>> Paul Furbacher
>>
>
More information about the openjfx-dev
mailing list