I set in my pom to use java 1.8 like this:
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
Then I did a "maven update project" and Eclipse/maven added the 1.8 JRE to the build path instead of the JDK. Hence I got restriction access to java fx classes.
My environment settings should be okay:
>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_05
>java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
>mvn -version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-0
2+01:00)
Maven home: C:\Program Files\apache-maven-3.2.1
Java version: 1.8.0_05, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_05\jre
Default locale: en_US, platform encoding: Cp1250
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
Any ideas what should I do to fix it?
I could change the project's build path manually in Eclipse but maven refresh would override it all the time.