The RFA APIs (.Net, C++ and Java editions) provide a console example application for developers in the API package:
The example can connect to your ADS server or your OMM Interactive provider application.
Please be informed that the RFA API is a feature-completed API (non-strategic). You may consider the Enterprise Message API (EMA Java, formerly known as Elektron Message API) which is a part of the strategic Refinitiv Real-Time SDK family (formerly known as Elektron SDK) for your new development application/project.
The EMA is designed for ease of use, so it should take a lot less time to implement and getting the data compares to implement with RFA API. Please see more detail in Real-Time SDK page.
I know you are asking for RFA Java, but since you are starting a new application, I would second the opinion offered by @wasin.waeosri.
EMA Java is our new replacement API for RFA, is considerably easier to use, and is our strategic real time API. Please use EMA going forward as it will be supported by Refinitiv going forward. RFA API is feature complete at this time.