Since I had problems compiling JavaFX code from Eclipse on Mac OSX 10.7 using the java 1.7.0_04 development kit, I just want to share my intermediate solution with interested people:
Problem:
The jfxrt.jar and other .jar files are not recognized when you select the new jdk issued by oracle as the new jre / jdk in eclipse.
jdk is installed in / Library / Java / JavaVirtualMachines / 1.7.0.jdk, which is recognized as a package.
Adding the path / Library / Java / JavaVirtualMachines / 1.7.0.jdk / Contents / Home / jre / lib / jfxrt.jar is not possible later, since the eclipse file open dialog does not allow you to go inside the package
Solution: Create a symbolic link from outside the package inside the package and follow the link in the file open dialog box.
Just go to the terminal and do the following:
[0- / Library / Java / JavaVirtualMachines]: sudo ln -s 1.7.0.jdk / Contents / 1.7.0.jdk_Contents
This creates a symbolic link 1.7.0.jdk_Contents using superuser privileges (sudo).
This compilation and execution of JavaFx code is working fine and as expected.
source
share