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

CLI version of the app doesn't start the VM with configured Java options #59

Open
amitjoy opened this issue Apr 8, 2022 · 0 comments
Open

Comments

@amitjoy
Copy link

amitjoy commented Apr 8, 2022

Recently #56 has been fixed which introduced the use of JPMS-related Java options while starting the VM. This works perfectly but the CLI version of the app which I downloaded using npm install -g osgifx cannot still use the same configured Java options while starting the app using osgifx command.

While starting the application from command line, I encountered the following:

java.lang.IllegalAccessError: class org.eclipse.fx.ui.workbench.fx.DefaultJFXApp (in unnamed module @0x2c84b3d3) cannot access class com.sun.glass.ui.Application (in module javafx.graphics) because module javafx.graphics does not export com.sun.glass.ui to unnamed module @0x2c84b3d3
	at org.eclipse.fx.ui.workbench.fx.DefaultJFXApp.setProductApplicationName(DefaultJFXApp.java:82)
	at org.eclipse.fx.ui.workbench.fx.DefaultJFXApp.<init>(DefaultJFXApp.java:54)
	at org.eclipse.fx.ui.workbench.fx.DefaultJFXApp.<init>(DefaultJFXApp.java:39)
	at com.osgifx.console.application.ConsoleFxStage.<init>(ConsoleFxStage.java:42)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(Unknown Source)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)

This clearly indicates that the JPMS-related Java arguments are still not set while starting the VM. If the configured VM options are set, the aforementioned exception will not appear.

The link to the application: https://www.jdeploy.com/~osgifx

@amitjoy amitjoy changed the title CLI version of the doesn't start the VM with configured Java options CLI version of the app doesn't start the VM with configured Java options Apr 8, 2022
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