Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wohu233 opened this issue Aug 23, 2024 · 1 comment
Labels
on-jira triaged Issues reviewed by a dev and considered valid. Will be added in Jira.

Comments

@wohu233
Copy link

wohu233 commented Aug 23, 2024

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
@ulisseslima
Copy link
Collaborator

ulisseslima commented Aug 26, 2024

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 ulisseslima added the triaged Issues reviewed by a dev and considered valid. Will be added in Jira. label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-jira triaged Issues reviewed by a dev and considered valid. Will be added in Jira.
Projects
None yet
Development

No branches or pull requests

4 participants
@ulisseslima @collaboratewithakash @wohu233 and others