Skip to content

Minecraft.Java ​

Discover Java runtimes, inspect requirements and select a runtime through launcher policy. Managed distribution offers describe the complete installable content accepted by the current installer.

Contract: nexa.minecraft.java/100. API index.

Typical sequence ​

Read the instance’s requirements before resolving selection. Use ListManagedDistributions and PrepareManagedInstall for the mapped multi-file distribution path, then commit through Install.

Behavior and limits ​

The older single-file distribution catalog and preparation route are not mapped in this snapshot. A selected runtime still needs platform, architecture and version compatibility.

The recorded Host maps 14 of 14 operations in this group. A mapping is subject to permission, phase, scope, platform and business preconditions. Host snapshot identifies the source revision; negotiate against the actual installed Host.

Operations ​

List · Discover · Inspect · ReadRequirements · ResolveSelection · SelectGlobal · SelectForInstance · ListDistributions · PrepareInstall · Install · Remove · RegisterDistributionProvider · ListManagedDistributions · PrepareManagedInstall

List ​

PageRequest → Page<JavaRuntime> (wrapper, item)

PropertyContract
Local SDK method ID1
KindQuery
Permissionnexa.minecraft.java.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
Cursorstring?Opaque continuation or observation cursor. Reuse only in the issuing query/scope; absence and invalidity are different. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
LimitlongRequested bound on returned items. The Host may impose a smaller domain-specific limit.

Successful result

Read Items and continue with NextCursor while preserving the original query. An absent cursor ends the sequence; an invalid cursor is an error.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_List(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_List_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Discover ​

RootRequest → OperationRef

PropertyContract
Local SDK method ID2
KindOperation
Permissionnexa.minecraft.java.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
RootRootRefStructured RootRef value; follow its linked field contract.

Successful result

Work has been admitted. Read or watch the owned operation through Tasks to establish its terminal result; admission is not completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_Discover(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_Discover_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Inspect ​

FileRef → JavaRuntime

PropertyContract
Local SDK method ID3
KindQuery
Permissionnexa.minecraft.java.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
TokenGuidOpaque Host-issued handle token. Keep it with its owner and resource type.
LoadInstanceIdGuidIdentity of the admitted load that owns this handle; it is not portable to a replacement load.
ScopestringExplicit target scope. The Host checks that the caller is authorized for it.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_Inspect(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_Inspect_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ReadRequirements ​

EntityRequest → JavaRequirements

PropertyContract
Local SDK method ID4
KindQuery
Permissionnexa.minecraft.java.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_ReadRequirements(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_ReadRequirements_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ResolveSelection ​

JavaSelection → JavaRuntime

PropertyContract
Local SDK method ID5
KindQuery
Permissionnexa.minecraft.java.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
InstanceEntityId?Identity or revision in this model’s domain; preserve ownership and exact spelling. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
RuntimeEntityId?Identity or revision in this model’s domain; preserve ownership and exact spelling. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
VersionLocalboolDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
ExpectedRevisionRevision?Revision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_ResolveSelection(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_ResolveSelection_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

SelectGlobal ​

JavaSelection → JavaRuntime

PropertyContract
Local SDK method ID6
KindMutation
Permissionnexa.minecraft.java.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
InstanceEntityId?Identity or revision in this model’s domain; preserve ownership and exact spelling. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
RuntimeEntityId?Identity or revision in this model’s domain; preserve ownership and exact spelling. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
VersionLocalboolDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
ExpectedRevisionRevision?Revision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_SelectGlobal(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_SelectGlobal_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

SelectForInstance ​

JavaSelection → JavaRuntime

PropertyContract
Local SDK method ID7
KindMutation
Permissionnexa.minecraft.java.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
InstanceEntityId?Identity or revision in this model’s domain; preserve ownership and exact spelling. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
RuntimeEntityId?Identity or revision in this model’s domain; preserve ownership and exact spelling. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
VersionLocalboolDomain value named by this field; additional accepted values and bounds are determined by the operation and Host policy.
ExpectedRevisionRevision?Revision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

Decode the exact output model after Success. Preserve its identities, revision and schema metadata for subsequent domain operations.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_SelectForInstance(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_SelectForInstance_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ListDistributions ​

PageRequest → Page<JavaDistribution> (wrapper, item)

PropertyContract
Local SDK method ID8
KindQuery
Permissionnexa.minecraft.java.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Aggregate published distribution providers and filter for the current OS and architecture. There may be at most eight providers and 128 entries per provider; provider replies must have no continuation cursor. The caller’s page is applied to the combined revisioned result. An empty result means no matching registered offer.

Request fields

FieldTypeMeaning
Cursorstring?Opaque continuation or observation cursor. Reuse only in the issuing query/scope; absence and invalidity are different. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
LimitlongRequested bound on returned items. The Host may impose a smaller domain-specific limit.

Successful result

Read Items and continue with NextCursor while preserving the original query. An absent cursor ends the sequence; an invalid cursor is an error.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_ListDistributions(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_ListDistributions_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

PrepareInstall ​

JavaInstallRequest → MutationPlan

PropertyContract
Local SDK method ID9
KindQuery
Permissionnexa.minecraft.java.read
Legal phasesInitialize, PostInitialize, Checkup, Finalize, Active
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Prepare a ZIP installation in a registered root’s runtime/plugin-<sha256> directory. Require Java major 8–99, matching host OS/architecture, an archive of 1–512 MiB, 1–8 HTTPS sources and a SHA-256 digest. Download.Target is replaced with a temporary Host-owned file grant. The review includes source, digest and the fact that Java will execute for probing. The owner rejects unsafe entries, caps extraction at 8,192 entries and 2 GiB total, probes exactly one bin/java executable, checks version/architecture and registers it with registry CAS. An unsuccessful registry CAS can leave a verified directory for explicit registration.

Request fields

FieldTypeMeaning
DistributionJavaDistributionStructured JavaDistribution value; follow its linked field contract.
TargetRootRefStructured RootRef value; follow its linked field contract.

Successful result

Retain the exact plan ID and revision, review its bound inputs and confirmation requirement, then use the corresponding commit operation.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_PrepareInstall(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_PrepareInstall_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Install ​

PlanRequest → OperationRef

PropertyContract
Local SDK method ID10
KindOperation
Permissionnexa.minecraft.java.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
PlanEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.
ConfirmationTokenstring?Domain value named by this field; additional accepted values and bounds are determined by the operation and Host policy. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.

Successful result

Work has been admitted. Read or watch the owned operation through Tasks to establish its terminal result; admission is not completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_Install(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_Install_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

Remove ​

EntityRequest → OperationRef

PropertyContract
Local SDK method ID11
KindOperation
Permissionnexa.minecraft.java.write
Legal phasesActive
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
IdEntityIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.

Successful result

Work has been admitted. Read or watch the owned operation through Tasks to establish its terminal result; admission is not completion.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Re-read after revision conflicts; cancellation does not prove rollback. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_Remove(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_Remove_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

RegisterDistributionProvider ​

ProviderDescriptor → RegistrationRef

PropertyContract
Local SDK method ID12
KindRegistration
Permissionnexa.minecraft.java.write
Legal phasesInitialize
IdempotencyRequiredKey
Host statusMapped in recorded snapshot

Register kind nexa:java/distributions with method ListDistributions: PageRequest → Page<JavaDistribution>. The current Host accepts verified ZIP distributions. Each entry identifies this provider and supplies OS, architecture, version, exact archive size and SHA-256. Multi-file Mojang offers continue to use ListManagedDistributions and PrepareManagedInstall.

Request fields

FieldTypeMeaning
IdQualifiedIdIdentity in this model’s domain. Use the identity issued or declared for this object, not a display name or filesystem path.
KindQualifiedIdHost-supported provider family. Registration succeeds only for a mapped family.
ContractVersionulongProvider contract version; current catalog read-provider callbacks use 100.
SchemaHashstringDigest of the provider callback envelope schema; current catalog read providers use BusinessProviderCall.
DisplayNameLocalizedTextUser-facing localized label; it is not an authority-bearing identity.
Capabilitiesstring[]Exact capabilities advertised or required by this descriptor, subject to the Host’s accepted table. A bounded collection; do not assume an unbounded result or unspecified ordering.
SupportedScopesstring[]Scopes the provider declares it can handle; declaration does not authorize every target. A bounded collection; do not assume an unbounded result or unspecified ordering.
SelectionSelectionPolicySelection rule; the current catalog callback boundary supports ExplicitRequest.
ConcurrencyConcurrencyPolicyDeclared execution policy. A provider family may reject enum members whose semantics it does not implement.
DeadlineMillisecondslongRequested deadline in milliseconds; queue time consumes this budget and caller deadlines can shorten it.
FailurePolicyProviderFailurePolicyHow this provider family reports callback failures; it does not automatically make retries safe.
ConfigurationSchemaRefSchema for provider configuration, not arbitrary executable Host configuration.
HandlerulongCallback identifier registered by this plugin. A handler alone is not a public action or provider registration.

Successful result

Retain the registration identity for the permitted update/release operation. Staged registrations become visible only at group activation.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. Supply a key for the intended effect and retain that key and inputs while resolving an uncertain reply. Do not retry with changed inputs under the same key. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_RegisterDistributionProvider(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_RegisterDistributionProvider_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

ListManagedDistributions ​

PageRequest → Page<ManagedJavaOffer> (wrapper, item)

PropertyContract
Local SDK method ID13
KindQuery
Permissionnexa.minecraft.java.read
Legal phasesActive
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Request fields

FieldTypeMeaning
Cursorstring?Opaque continuation or observation cursor. Reuse only in the issuing query/scope; absence and invalidity are different. Nullable; omission is distinct from an empty value. No implicit default is promised by this type.
LimitlongRequested bound on returned items. The Host may impose a smaller domain-specific limit.

Successful result

Read Items and continue with NextCursor while preserving the original query. An absent cursor ends the sequence; an invalid cursor is an error.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_ListManagedDistributions(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_ListManagedDistributions_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.

PrepareManagedInstall ​

ManagedJavaInstallRequest → MutationPlan

PropertyContract
Local SDK method ID14
KindQuery
Permissionnexa.minecraft.java.read
Legal phasesActive
IdempotencyReadOnly
Host statusMapped in recorded snapshot

Use an offer returned by ListManagedDistributions. The managed offer describes the installer’s multi-file manifest; it is not interchangeable with the older JavaDistribution model.

Request fields

FieldTypeMeaning
OfferEntityIdIdentity or revision in this model’s domain; preserve ownership and exact spelling.
ExpectedRevisionRevisionRevision observed before this change. Preserve it exactly; a mismatch requires re-reading and reconciling the target.

Successful result

Retain the exact plan ID and revision, review its bound inputs and confirmation requirement, then use the corresponding commit operation.

Failure and retry

Unavailable capability, denied permission, wrong phase, malformed schema or foreign ownership fails the call. A read-only classification does not bypass budgets or guarantee a failed request can be retried indefinitely. Preserve structured errors; see recovery guidance.

C binding (call fragment; the caller supplies the encoded request and buffers):

c
nx_Minecraft_Java_PrepareManagedInstall(&reply, request, &options);

The next resume receives the reply. Check nx_reply_success before nx_Minecraft_Java_PrepareManagedInstall_result. See the complete continuation example and Wasm ownership rules. This fragment is not a standalone guest.


Source: NexaCL-Plugin-SDK · Apache-2.0.

Site documentation: CC BY-SA 4.0. Imported SDK documents: Apache-2.0 as marked.