Skip to content

Commit 88bcf93

Browse files
committed
docs: add summary and cross-references to IMPLEMENTING_JRES.md
1 parent 0fddbea commit 88bcf93

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/IMPLEMENTING_JRES.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,3 +327,22 @@ cf ssh myapp -- echo $MEMORY_LIMIT
327327
```
328328

329329
**Wrong Java version selected** — check resolution order: `BP_JAVA_VERSION` → `JBP_CONFIG_<KEY>_JRE` → manifest default. Enable debug: `cf set-env myapp BP_LOG_LEVEL DEBUG`.
330+
331+
## Summary
332+
333+
Adding a standard JRE (one that embeds `BaseJRE`) requires three things:
334+
335+
1. **Create `src/java/jres/<name>.go`** — embed `BaseJRE`, call `newBaseJRE()`, set `extraFinalizeOpts` if needed
336+
2. **Add dependency to `manifest.yml`** — `name`, version, URI, SHA256, stacks; add to `default_versions` if applicable
337+
3. **Register in `src/java/supply/supply.go`** — one `jreRegistry.Register(jres.NewMyJRE(ctx))` call
338+
339+
`BaseJRE` handles everything else: download, extraction, `findJavaHome`, `profile.d` script, JVMKill, Memory Calculator, base JVM opts.
340+
341+
For JREs that cannot use `BaseJRE` (e.g. Zing — no memory calculator, custom detection), implement the full `jres.JRE` interface manually and use the helper functions listed above.
342+
343+
## See Also
344+
345+
- [DEVELOPING.md](DEVELOPING.md) — building and running the buildpack locally
346+
- [TESTING.md](TESTING.md) — unit and integration test framework
347+
- [IMPLEMENTING_FRAMEWORKS.md](IMPLEMENTING_FRAMEWORKS.md) — adding framework support
348+
- [IMPLEMENTING_CONTAINERS.md](IMPLEMENTING_CONTAINERS.md) — adding container types

0 commit comments

Comments
 (0)