java.lang.NoClassDefFoundError only on Mac OS [message #1753754] |
Thu, 09 February 2017 16:27  |
Eclipse User |
|
|
|
Hi all,
Among other tests in my fragment project, I've created a JUnit test case for comparing two JavaFX images. So I got an error java.lang.RuntimeException: Internal graphics not initialized yet.
I investigated a bit and found couple of threads where adding new JFXPanel(); into the setUpBeforeClass method solves the problem with graphics initialization.
BUT, this works on my Windows 7 machine but not on Mac machine. On Mac I get an error org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javafx/embed/swt/FXCanvas.
I'm running the tests as JUnit Plugin test with
-Dosgi.framework.extensions=org.eclipse.fx.osgi VM argument.
Any help would be much appreciated.
|
|
|
Re: java.lang.NoClassDefFoundError only on Mac OS [message #1753824 is a reply to message #1753754] |
Fri, 10 February 2017 12:47   |
Eclipse User |
|
|
|
I've managed to run the test as JUnit plug in test, locally on my Mac, which uses JDK 1.8.0_91. Also, when I run the tests using maven's clean install command, tests pass.
Now I have the same error on Jenkins machine which uses JDK 1.8.0_65, tests do not pass when run with clean install command. I've checked for jfxswt.jar and it is present under jre/lib path...
|
|
|
Re: java.lang.NoClassDefFoundError only on Mac OS [message #1772521 is a reply to message #1753824] |
Mon, 11 September 2017 23:20  |
Eclipse User |
|
|
|
I'm encountring the same issue, I have a JavaFX test that runs successfully in OSX but fails in windows throwing the exception : java.lang.RuntimeException: Internal graphics not initialized yet.
But when I add new JFXPanel(); to initialize JavaFX environment as many threads suggest, then test started failing at OSX and running successfully in windows.
No solution seems to be working, did you find any solution ?
|
|
|
Powered by
FUDForum. Page generated in 0.03281 seconds