'OpenJdK 8 - Can't compile package javafx.util does not exist

Linux Mint 20.3
   os.name = Linux
   os.arch = amd64
   os.version = 5.13.0-25-generic



 Java : 
    openjdk version "1.8.0_322"
    OpenJDK Runtime Environment (build 1.8.0_322-b06)
    OpenJDK 64-Bit Server VM (build 25.322-b06, mixed mode)

Maven 3.8.3

I build my java project by Maven.

When I try to compile my java project by OpenJdk 1.8.0_322:

  package com.myproject;
    
    import java.util.Collection;
    import java.util.List;
    import java.util.Map;
    
    
    import javafx.util.Pair; //  here error
    
    @SuppressWarnings("rawtypes")
    public interface SomeMyInterface {
      // some code here
      Map<Integer, List<Pair<Integer,Integer>>> findAllMgIdsAssociatedNsPairs();
    }

I get error:

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /SomeMyInterface.java:[10,19] package javafx.util does not exist

P.S. If I use jdk1.8.0_202 from Oracle the project success compile!

P.P.S. The project must be compile by java 8. It's client requirements.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source