Reputation: 21
i'm, playing with an Eclipse 4 Application and Java 8, currently in Eclipse Kepler SR2. There are various pitfalls which i don't understand, therefore i'm looking for your help:
When i create a new plug-in in Java 8 (JDK) environment, the jfxrt.jar is listed in the JRE System Libraries in my project.
When i try to access a jfxrt class, i'll get an error (Discouraged Access). I tried to solve the error adjusting the build path by creating an Access Rule (*/) to my JRE System Library. Sometimes it worked, somestimes i had to adjust the Compiler Settings for Discouraged Access to warning too.
Afterwards, i could access the classes and compile them, but when i try to run (debug), the classes are still NOT visible to the plugin:
java.version=1.8.0
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments: -product de.fsch.ibot.app.product -clearPersistedState
Command-line arguments: ... -consoleLog -clearPersistedState
!ENTRY org.eclipse.osgi 4 0 2014-04-03 09:15:12.790
!MESSAGE Application error
!STACK 1
.
.
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
Any suggestions for me ?
Upvotes: 1
Views: 1121
Reputation: 5341
For the restricted access, do this: Go to project properties, java build path, libraries.
Got this from this SO answer.
Annoyingly, this worked for me!
Upvotes: 0
Reputation: 5897
My suggestion is: Do yourself some a favor and install e(fx)clipse e.g. you can get an all in one download from http://efxclipse.bestsolution.at/install.html or use the update-site from http://www.efxclipse.org/install.html and follow https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2 if you want to go pure fx (no swt involved) then https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial3 and https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial4 are probably interesting to you
Upvotes: 1