Java
Java is fully supported by Speedscale. Use this page for Java-specific proxy settings, TLS trust configuration, demo guidance, and the Proxymock local workflow.
- Support matrix: Technology Support
- Shared Proxymock proxy reference: Language Configuration
Demo App
- Public demo: speedscale/demo (
javadirectory) - Stack: Spring Boot
- Local run:
make local - Traffic generator:
make clientormake client-capture
This is the current public Java demo used for local Proxymock examples.
Proxymock
Use this path for the fastest Java first success on a developer workstation.
- 1. Install and initialize Proxymock
brew install speedscale/tap/proxymock proxymock initUse browser sign-in by default. Use `proxymock init --api-key <your key>` only for CI or other headless environments.
- 2. Start recording
git clone https://github.com/speedscale/demo cd demo/java proxymock record --app-port 8080 --out ./proxymock/recordedThe app listens on port 8080 while proxymock records inbound traffic on 4143 and saves the capture in `./proxymock/recorded`.
- 3. Route Java traffic through the proxy and run the app
cd demo/java export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=4140 -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=4140 -Djavax.net.ssl.trustStore=${HOME}/.speedscale/certs/cacerts.jks -Djavax.net.ssl.trustStorePassword=changeit" make localThis keeps the JVM on the proxy path and uses the proxymock truststore for TLS interception.
- 4. Generate one real workflow
cd demo/java make client-captureExercise the SpaceX and Treasury requests once so the exported capture reflects the real demo flow.
- 5. Stop the recording, then run with mocks
cd demo/java proxymock mock --in ./proxymock/recorded make local-captureThe mocked run should no longer need live downstream access.
- 6. Replay the same traffic against a change
cd demo/java proxymock replay --in ./proxymock/recorded --test-against http://localhost:8080Use replay as the regression check before shipping Java changes.
TLS Trust
Java typically needs an explicit truststore when TLS interception is involved. See the shared Language Configuration page for the exact proxymock certs --jks command, JVM flags, and custom truststore workflow.