Skip to content
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

Using Modules for new Java Process (for JavaFX, for example) #12

Open
brainbytes42 opened this issue May 3, 2023 · 0 comments
Open

Comments

@brainbytes42
Copy link

Hi,

is it possible to include modules / module paths in created java processes?

I'm trying to spawn JavaFx Applications in their own processes to encapsulate them, but have a small GUI just to give a visual indicator of theri progress. But since JavaFX ist now separated, it needs to be added as modules... Without that, the ClassLoader can't find the JavaFX Application-class...

See here for an example: https://blog.idrsolutions.com/using-javafx-with-java-11/

When I create a simple JavaProcessPool new JavaProcessPoolExecutor(new JavaProcessManagerFactory<>(new SimpleJavaProcessConfig()), ... ), the classpath of the calling application will be in the child process as well, but this isn't true for modules.

I have outputted the module path in the calling app an in the child app (System.getProperty("jdk.module.path")) - for the calling, it contains javaFx, for the child it's just null.

It would be great, if the modules from the calling app could be added to the child process / to the child process's module path (–module-path ... and –add-modules ...). Or is there any workaround to get this happening?

Any thoughts? :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant