-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behavioral differences between conveyor run and conveyor make app #56
Comments
That's very weird. Off hand I can't think of what could cause that. The run command is extremely simple. It literally just triggers the build of the app task, and then locates the first entry point and runs it. What's the exception? Random things to try:
|
Good call. That "fixed" it. It seems to execute correctly when the working directory is anything other than The code is just calling into ControlsFX, so I have a feeling this will be a pain to debug... 😠 import fxsampler.FXSampler;
public class ChartFxSampler {
public static void main(String[] args) {
FXSampler.main(args);
}
} It doesn't look like a Conveyor issue, so I'll go ahead and close it. |
It might still be an issue - maybe when argv[0] isn't a path our custom JNI launcher code isn't doing something that the |
I found nothing on the app side 😔 |
OK, I'll take a look when I get a chance. What's the stack trace? |
There is only a lack of samples, so there is no stack trace. I just found the issue though: It's using an older version of FXSampler that searches for jars/directories at or below the working directory: SampleScanner.java#L173-L197.
The latest version unfortunately only loads examples on the module path, so that one doesn't work at all. |
Afaik there is no way to change the working directory post VM startup, so besides fixing it upstream (the right thing to do), I can think of a few workarounds:
Update |
I'm not sure overriding
and see if it affects the working directory. Presumably you can't use the existing samples as auto modules? A couple of alternatives that spring to mind:
I've been meaning to do (2) for ages but never got around to it. Like, give it a Maven coordinate or some inputs and it'd spit out a "real" module, so like auto-mods but better because they'd have real dependency data and jlink would accept them. |
Thanks, the It's not my project, so modularizing it is out of scope. I figured I could quickly add a conveyor configuration, but I completely underestimated the brittleness of the ControlsFX Sampler project. RE (2) I've run into so many issues with modules that I stopped trying to have fully-modularized projects. I've also tried adding a combined module descriptor with moditect to a shaded/shrunk jar, but I ran into some issues with that too. It'd be nice to have a tool that reliable takes care of it, but please add a flag to disable it in case something goes wrong. |
Describe the bug
I'm trying to package an FXSampler based app (see chart-fx#580).
conveyor run
behaves as expected, butconveyor make windows-app
and running the executable doesn't find the samples (uses reflection).Can you think of anything that would be different between the
run
andmake app
commands?To Reproduce
Steps to reproduce the behavior:
clean package -DskipTests --projects chartfx-samples -am
(using JDK 15)cd chartfx-samples
conveyor run
(works)conveyor make windows-app
and double-click the.exe
(does not work)Expected behavior
Both versions should act the same.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: