Where can I get the JAR for the sandbox-next or HTTP-JSON API processes?

I looked at the SDK releases and it seems that they only include one big fat JAR daml-sdk.jar. Are separate JARs for the components published anywhere?

1 Like

We only publish sandbox and the JSON API as libraries atm not as standalone fat JARs. I believe we also only publish sandbox-classic and not sandbox-next. You can see the full list of artifacts that are published at daml/artifacts.yaml at 7e0377dd76e0ff4be6cb3b2604eb7f80ea041bab · digital-asset/daml · GitHub.

1 Like

Sandbox Classic and Sandbox Next are part of the same Sandbox JAR. If you have one, you have the other.

The main class name for Sandbox Next is com.daml.platform.sandboxnext.Main. If you have a fat JAR, you may be able to run it with a command something like this:

java -cp sandbox.jar com.daml.platform.sandboxnext.Main [args...]
2 Likes

To build your own fat JAR, you can suffix a java_binary Bazel target with _deploy.jar. So to build Sandbox Next as a fat JAR, you can run:

bazel build //ledger/sandbox/sandbox-next-binary_deploy.jar

The fat JAR will be built in bazel-bin/ledger/sandbox/sandbox-next-binary_deploy.jar.

You can then run it like so:

java -jar bazel-bin/ledger/sandbox/sandbox-next-binary_deploy.jar [args...]

And, of course, you can copy it wherever you like, as it’s standalone.

2 Likes

We have started experimenting with publishing fatjars. This is still very much subject to change, but if you’re not afraid of breaking changes (in the publication method/location; this is not a comment on the maturity of the components themselves), you can help us test the new setup.

Starting with snapshot 1.2.0-snapshot.20200520.4228.0.595f1e27, you can find the JSON API at
https://daml-binaries.da-ext.net/json-api/http-json-1.2.0-snapshot.20200520.4228.0.595f1e27.jar

You can append .asc to the filename to get a signature file (same as for the release artifacts on GitHub; see install docs for how to check those). We may start publishing more components that way in the future (or stop altogether; as I said, consider this very alpha at this point).

Alternatively, if you are not concerned about JAR file size or code bloat at the moment, you can change the default main method of the daml-sdk jar to create a standalone tool as I explained here. You can check here for a list of main class for each app.

2 Likes