Access restriction: The type 'TransferMode' is not API (restriction on required library 'C:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\jfxrt.jar')
In short, you can give access permission from the following location.
You can edit it from ** Edit ** on the right of the image above, add ** javafx / \ * \ *** to Accessible with a rule, and allow it.
As expected, the command ** gradlew eclipse ** is hit every time the dependency is updated, so it's annoying to be able to make this setting every time.
It's really annoying when someone clones from git and says "I'm getting an error (laughs)".
So, how to write in gradle.
build.gradle
import org.gradle.plugins.ide.eclipse.model.AccessRule
eclipse {
classpath {
file {
whenMerged {
def jre = entries.find { it.path.contains 'org.eclipse.jdt.launching.JRE_CONTAINER' }
jre.accessRules.add(new AccessRule('accessible', 'javafx/**'))
}
}
}
}
Like this. This adds the following to Eclipse's .classpath, which reduces the amount of mouse I use, reduces frustration, reduces war, and makes the world peaceful.
.classpath
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/">
<accessrules>
<accessrule kind="accessible" pattern="javafx/**"/>
</accessrules>
</classpathentry>
Thank you always, Stack Overflow guy. Also, [JavaFX] Eclipse, access restriction: The type'?' Is not API (? Ex: JavaFX) and what to do when it comes out @ Smk7758.
Alright, it's about time. I'm going home.
Recommended Posts