'Getting Error for @CucumberOptions and seems cucumber.class deprecated

[My Test Runner Class][1]

I tried to create TestRunner Class (using Eclipse-Java11-Cucumber-Maven); however getting error for CucumberOptions annotation and seems Cucumber.class is deprecated. Please let me know how to solve this? Please see attached image.

Also, below is the Test Runner Code:

package TestRunner;

import io.cucumber.junit.platform.engine.Cucumber;
import io.cucumber.junit.platform.*;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;


@RunWith(Cucumber.class)
@CucumberOptions(
        feature = "src\\test\\java\\AppFeatures",
        glue = "StepDefinitions")

public class Runner {
    
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  [1]: https://i.stack.imgur.com/etCZ6.png


Sources

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

Source: Stack Overflow

Solution Source