tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

[ISSUE] In the showcase of Java Service Provider Interface , command line output is empty

Open wohu233 opened this issue 1 year ago • 1 comments

https://github.com/eugenp/tutorials/tree/master/core-java-modules/java-spi

Steps to Reproduce

Run this command in root of the java-spi module , the command line output is empty.

java -cp "D:\java-spi\exchange-rate-api\target\exchange-rate-api-1.0.0-SNAPSHOT.jar;D:\java-spi\exchange-rate-app\target\exchange-rate-app-1.0
.0-SNAPSHOT.jar;D:\java-spi\exchange-rate-impl\target\exchange-rate-impl-1.0.0-SNAPSHOT.jar;D:\java-spi\exchange-rate-impl\target\depends\*" com.baeldung.rate.app.MainApp

Expected Behavior

Retreiving USD quotes from provider :com.baeldung.rate.impl.YahooFinanceExchangeRateProvider@27973e9b
...
...
...

Environment

  • OS: Windows10
  • JAVA:1.8

Additional Information

  • Confirmed that the META-INF/services/com.baeldung.rate.spi.YahooFinanceExchangeRateProvider file exists.
  • Confirmed that the YahooFinanceExchangeRateProvider class correctly implements the ExchangeRateProvider interface.
  • Checked the classpath and confirmed that the relevant dependencies are properly packaged

wohu233 avatar Aug 23 '24 08:08 wohu233

Hey, @wohu233.

This might be a windows-related issue. This issue will remain open while we look into it.

Article link: https://www.baeldung.com/java-spi

ulisseslima avatar Aug 26 '24 20:08 ulisseslima

Thanks for the feedback here - that's always super helpful. We do naturally try to keep everything updated, but, as you might imagine, in some cases, we also do have to prioritize some updates over others. This looks to be one that won't have high priority. We now have a note internally on it - closing this issue here. Thanks, Team

collaboratewithakash avatar Feb 26 '25 11:02 collaboratewithakash