Ok, so I've actually completed my program in JavaFX and everything is working nicely, but I have two reports that I need to be able to print, and wouldn't you know it? JavaFX doesn't support printing!
I've been trying to work around this by way of making a JFrame that imports all the data from JavaFX, but it keeps NOT displaying the JFrame and giving me the following error:
2013-07-25 16:58:05.334 java[2150:707] [JRSAppKitAWT markAppIsDaemon]: Process manager already initialized: can't fully enable headless mode.
I assume this happens because the same instance of JRE can't run FX and display a Swing JFrame at the same time? Because the same code WILL work if run on it's own (just doesn't have the data from the FX app to display in the reports).
So my question is, is there a workaround that does not entail me re-writing all my FX code to Swing? The printer being used is a generic/text only dot matrix printer, so I was trying to import the data to the JFrame because then it would be easy to print the entire frame of text. Perhaps my JFX report generator could open the JFrame in a new JRE? or is there a way to get it to work in the same JRE? I do need it to be seamlessly integrated into the existing system so the user can generate the report from the JFX GUI and have it print automatically rather than generate the report, then go to another (Swing) GUI to print it.
Help!
Ok, so I tried the suggested answer of using the beta release of Java 8, but now nothing works. I get the following error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/javafx/main/Main : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:791) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482) Java Result: 1