Tino APCS

Option 1: JDK 8

JDK 8 comes with JavaFX. To install JDK 8 on your computer, download and install it here.

This page goes with this option. If you'll be using a recent JDK such as JDK 11 or higher, skip ahead to the Option 2 page.

Add Java 8 to Eclipse

Once you have JDK 8 installed, you need to tell Eclipse where to find it.

  1. Go to the preferences menu option

    • Windows: Window → Preferences

    • Mac: Eclipse → Preferences

  2. Go to Java → Installed JREs

  3. Click on Add...

  4. Confirm Standard VM is chosen and click next.

  5. Click on the directory button to choose the java home location.

    • Windows

      • Java is most likely installed in C:\Program Files\Java

      • Select the jdk1.8.0... folder.

    • Mac

      • In the menu bar at the top of the finder select Go → Go to Folder

      • In the box paste in the path: /Library/Java/JavaVirtualMachines/

      • Navigate into the folder for jdk 8 (something like jdk1.8.0_181.jdk)

      • Open Contents and select the Home folder.

  6. Click Finish

  7. Check the box next to jre1.8.0 to make that the default JRE.

  8. Click Apply and Close

Access Restriction Error

Some versions of Eclipse require you to "enable" JavaFX when running Java 8. If you get an error saying "Access restriction: The type 'Application' is not API…" then you need to follow the directions below to enable JavaFX in Eclipse. You must do this for each project that you want to use JavaFX.

  1. Create a new Java Project as usual.
  2. After you have created the project, right-click it and choose Build Path → Configure Build Path
  3. Click on the Libraries tab (step 1 below) and then expand the JRE System Library tree (step 2 below).
  4. Then select Access rules (step 3 above) and click the Edit button (step 4 above)
  5. Finally, click the Add... button in the window that pops up and make a new rule as follows:
    • Resolution: Accessible
    • Rule Pattern: javafx/**
  6. Click Ok, then Ok, then Apply and Close

This will enable JavaFX for the current project. You must do this for each project that uses JavaFX.

Dark Mode

Outline