# Java full-session JNI runtime input discovery

The Java full-session helper now selects a JNI library through the existing
`libhftjava.library` property, then `LIBHFT_JAVA_NATIVE_LIBRARY`,
`LIBHFT_JAVA_TARGET`, the published Java suffix beneath `LIBHFT_BUILD_ROOT`,
or legacy `libhftjava.project`/`LIBHFT_JAVA_SOURCE`. Unconfigured development
and standalone layouts use workload/support markers rather than fixed
development-machine paths or Git ancestry. Targets search native then
native-open; exact-library selection remains available. An unconfigured
process with no discovered artifact retains normal SDK library-path lookup.

Missing configured artifacts/source directories and relative build roots fail
before loading without borrowing a lower-priority input. Home expansion and
paths with spaces work. These inputs select the native runtime artifact;
Java classes/JARs remain separate classpath/build inputs. The helper does not
attest SDK source or extend a retained benchmark's grade.

## Actual complete-archive proof

Tested source **`cb204cb8bb38c189cca66bf41540a905d7e1e1e3`** is preserved on
`s/codex-fullbench-java-jni-inputs-source-20261003`. Its complete materialized
draft manifest contains **737 files**, without `.git`, `bench/`, `engine/`
or `internal/`. HP status/process/memory checks precede an outer high-priority
`isol` lease on CPUs 8–17; this permits shared work and carries no timing grade.

OpenJDK 17.0.20.1 compiles the actual archive runtime and harness support with
`--release 8`. All **12 JUnit tests** pass, with **zero skips**, checking
input precedence/refusal, development and standalone discovery, public native
outputs, legacy selection and home expansion. The archive inside an enclosing
development/Git tree still selects only its own sibling SDK target.
`TestTempFiles` removes fixtures at JVM exit, including failed checks.

The separate actual public SDK probe opens `NativeEngine`, calls
`nativeVersion()` and closes the engine in five fresh JVMs. All five pass:
explicit property, exact environment library, environment target, published
build root and legacy project. Five additional fresh JVMs reject missing
property/environment libraries, a missing target/source or relative build root
before native loading. The SDK's load/ABI checks execute in each successful JVM.
No native output is moved or rebuilt.

The retained Stage 2 `46521e3187ff` SDK JAR and native-open library are read-only
inputs, verified against their original preservation seal. Their SHA256 values
are:

| Artifact | SHA256 |
|---|---|
| Actual SDK JAR, with a space in its path | `6ca60a3f41ba520ceeee749f6243734e96513d199e3199e04e2a14b07550b07e` |
| Actual native-open JNI library | `d0acbd1b8f006c2ce1576b3271d25115c4c5611639dc8a28129b79b5da3186ba` |

The four external SDK/JUnit/Hamcrest inputs and all 737 source files remain
byte identical after execution. Source/SDK release attestations, full-session
flows, physical/report timing and ranking are separate gates. The original
qualified Stage 2 ranking and its prepared SDK/runtime sources are unchanged.

## Retention

All **30 original files**, including compiled harness/test/probe classes,
are byte verified on HP and BEELINK2 under
`~/archive/libhft/java-jni-inputs-hp-20261003-cb204cb8bb38`.
Repository evidence omits only eleven compiled class files and retains the
original HP seal and every omitted hash. Controllers, actual command/input
receipts, stdout/stderr, successful native versions and refusal logs remain
retained. The SDK JAR/library are referenced by their original paths/hashes,
without copying them into this campaign or the repository.

The separate BEELINK2 JUnit run also passes twelve checks without skips.
Publication preserves concurrent main changes. All qualified discovery,
unit-test and actual compiled harness-support inputs remain byte identical:
736 of the 737 archive files match; only the source-layout guide differs.
The [integrated input map](evidence/java-jni-runtime-inputs-20261003/integrated-inputs.json)
pins every original and changed hash. The integrated twelve checks also pass
without skips.
The current draft selects 734 source files, with 133 scrub findings in 31
files, 85 textual source-root escapes and zero dead documentation links.
These are migration counts, without standalone release admission.

[Sealed archive, actual SDK load/refusal and local test
evidence](evidence/java-jni-runtime-inputs-20261003/SHA256SUMS).
