[http-fault-injector] Add README.md to java samples (#9361)

This commit is contained in:
Mike Harder 2024-11-11 13:04:46 -08:00 коммит произвёл GitHub
Родитель 607a9d8241
Коммит 72316fa454
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -41,10 +41,11 @@ Tool 'azure.sdk.tools.httpfaultinjector' was successfully updated from version '
After these steps, .NET clients should automatically trust the certificate. Other client languages may need additional steps.
### Java Windows
### Java
1. Run `dotnet dev-certs https --export-path dotnet-dev-cert.pfx` to export the cert to a file
2. Run `keytool -importcert -cacerts -file dotnet-dev-cert.pfx` to import the cert to the Java default cacerts keystore
1. Requires admin command prompt.
2. Run `keytool -importcert -cacerts -file dotnet-dev-cert.pfx` (requires sudo/admin)
1. If prompted to `enter keystore password`, the default after installing Java is `changeit`
2. If `-cacerts` doesn't work, you can try replacing it with `-keystore /path/to/your/keystore`. May be required depending how Java was installed, or especially if you have multiple versions installed side-by-side.
## Walkthrough
1. Run `http-fault-injector`

Просмотреть файл

@ -0,0 +1,4 @@
## java-sample-clients
1. `mvn compile`
2. `mvn dependency:build-classpath -Dmdep.outputFile=classpath.txt`
3. `java -cp target/classes:$(cat classpath.txt) httpfaultinjectorclient.App`