title: Eclipse - External jars need to be manually added
body: <p>I had a question that was answered with <a href="https://stackoverflow.com/questions/12209956/adding-jfxrt-jar-to-standard-eclipse-build-path">adding jfxrt.jar to standard Eclipse build path</a>.</p>
  
  <p>I followed the suggestion, adding the jfxft.jar as an External Jar on the jdk1.7.0_10.jdk JRE i have installed (under Eclipse > Preferences > Java > Installed JREs).</p>
  
  <p>But when I import "javafx.application.Application"</p>
  
  <p>It errors with:</p>
  
  <p>Access Restriction: The type Application is not accessible due to restriction on required library /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre/lib/jfxrt.jar</p>
  
  <p>There are posts on this such as <a href="https://stackoverflow.com/questions/9266632/access-restriction-is-not-accessible-due-to-restriction-on-required-library">Access restriction: Is not accessible due to restriction on required library ..\jre\lib\rt.jar</a></p>
  
  <p>I can fix this possibly by the suggestions in that thread (though I'm not convinced they are good solutions).</p>
  
  <p>Or I found a better solution of adding the External Jar directly to the project:
   - go to the JRE and remove the External Jar as setup above
   - Open project properties and go to Java Build Path
   - Go to Libraries tab
   - Add External JARS... and choose exactly the same jfxrt.jar</p>
  
  <p>No access restrictions now!</p>
  
  <p>Why does it work one way but not the other?  The advantage of adding directly to the JRE configuration is that it only needs to be done once.</p>
  
  <p>Thanks,</p>
  
  <p>Hank</p>