I'm using IDEA 14.01 and have a problem when compiling against recent builds of OpenJDK 9. It seems that IDEA is using javac's internal API which changed recently, so I get the following error when compiling:
Information:Using javac 1.9.0-internal to compile java sources
Information:Module "jdk9-dev-test" was fully rebuilt due to project configuration/dependencies changes
Information:11/30/14 10:23 AM - Compilation completed with 1 error and 0 warnings in 1 sec
Error:java: java.lang.NoSuchMethodError: com.sun.tools.javac.file.RelativePath$RelativeDirectory.getFile(Ljava/io/File;)Ljava/io/File;
Is there a way to force IDEA to use a different javac (say from JDK8 for example), but still compile against Project/Module SDK as far as classes are concerned?