# Codegen Java dpm

**URL:** <https://forum.canton.network/t/codegen-java-dpm/9054>\
**Category:** App Development\
**Tags:** daml\
**Created:** [August 10, 2026, 1:10am UTC](https://forum.canton.network/t/codegen-java-dpm/9054 "2026-08-10T01:10:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![austin](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@austin](https://forum.canton.network/u/austin)\
**Post date:** [August 10, 2026, 1:10am UTC](https://forum.canton.network/t/codegen-java-dpm/9054/1 "2026-08-10T01:10:43Z")

</div>

Hi,

I am on dpm 3.5.4 or version 1.0.21 and I am attempting to generate java bindings for my dar. I went to run `dpm codegen-java` and it seems like that command no longer exists? Was it moved to a different location within dpm?

Thanks,

Austin

---

<div class="post-metadata">

**Author:** ![Federico\_Rodriguez](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/federico_rodriguez/32/7339_2.png) [@Federico\_Rodriguez](https://forum.canton.network/u/Federico_Rodriguez)\
**Post date:** [August 10, 2026, 1:40pm UTC](https://forum.canton.network/t/codegen-java-dpm/9054/2 "2026-08-10T13:40:53Z")

</div>

Hey, `codegen` and its `codegen-java` command, are included [in the 3.5.4 bundle](https://github.com/digital-asset/dpm-assembly/blob/049fe5b0702782b5436ef9ff2471bd070275b31c/latest/open-source/3.5.yaml#L7).

If that is not the case for you, here are a few things to check:

**1. Check which DPM is running**

```haskell
which dpm
dpm version --active
dpm --version

```

Expected active SDK: `3.5.4`.

**2. Check environment overrides**

```haskell
echo "$DPM_HOME"
echo "$DPM_SDK_VERSION"
echo "$DPM_REGISTRY"
echo "$DPM_EDITION"

```

Watch for `DPM_HOME` pointing somewhere unexpected, or `DPM_SDK_VERSION` overriding the SDK away from `3.5.4`.

**3. Check whether the project config overrides SDK components**

```haskell
find .. -name daml.yaml -o -name multi-package.yaml
rg -n "sdk-version|components:" daml.yaml multi-package.yaml ../*/daml.yaml ../*/multi-package.yaml

```

If `components:` is present, DPM may ignore the bundled SDK components and only expose explicitly listed components. Make sure `codegen` is included.

**4. Check DPM’s resolved component set**

```haskell
dpm resolve --output json | jq '.DefaultSDK, .Packages'

```

For `3.5.4`, expect to see:

```haskell
"codegen": {
  "version": "3.5.2"
}

```

**5. Check the installed SDK manifest**

```haskell
cat ~/.dpm/cache/sdk/open-source/3.5.4.yaml

```

Expected:

```haskell
codegen:
  version: 3.5.2

```

**6. Check the codegen component itself**

```haskell
cat ~/.dpm/cache/components/codegen/3.5.2/component.yaml
ls -l ~/.dpm/cache/components/codegen/3.5.2/binary.jar

```

In `component.yaml`, expect:

```haskell
name: codegen-java

```

**7. Try the command directly**

```haskell
dpm codegen-java --help

```

Expected:

```haskell
codegen-java 3.5.2

```

---

<div class="post-metadata">

**Author:** ![austin](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@austin](https://forum.canton.network/u/austin)\
**Post date:** [August 10, 2026, 11:40pm UTC](https://forum.canton.network/t/codegen-java-dpm/9054/3 "2026-08-10T23:40:30Z")

</div>

Hi Federico, thanks for the response! I see everything that you are expecting me to see. However, when I actually run `dpm codegen-java` I get `Error: unknown command "codegen-java" for "dpm"￼Run 'dpm --help' for usage.` Then when I run `dpm help` there is no codgen-java command visible:

dpm help  
Usage:  
dpm [command]

Meta Commands  
add Add components and dars to project  
install Install project’s dependencies or specific dpm-sdk version  
publish Commands for publishing artifacts  
tags List published tags of an artifact  
uninstall Uninstall a dpm-sdk version  
update Update project dependencies  
version Show sdk versions

Dpm Commands  
build Build a Daml package or project  
clean Clean a Daml package or project  
damlc Compiler and IDE backend for the Daml programming language  
docs Generate documentation for a daml package from its documentation comments  
inspect-dar Inspect a DAR archive  
script Daml Script Binary  
studio Launch Daml Studio  
test Test the current Daml project or the given files by running all test declarations.  
validate-dar Validate a DAR archive

Additional Commands:  
completion Generate the autocompletion script for the specified shell  
help Help about any command

Flags:  
-h, --help help for dpm  
-v, --version version for dpm

Use “dpm [command] --help” for more information about a command.

---

<div class="post-metadata">

**Author:** ![Federico\_Rodriguez](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/federico_rodriguez/32/7339_2.png) [@Federico\_Rodriguez](https://forum.canton.network/u/Federico_Rodriguez)\
**Post date:** [August 11, 2026, 12:31pm UTC](https://forum.canton.network/t/codegen-java-dpm/9054/4 "2026-08-11T12:31:10Z")

</div>

Your `dpm help` output is missing more than just `codegen-java`. A normal full `3.5.4` installation should also show commands such as:

- `codegen-js`

- `sandbox`

- `canton-console`

- `new`

- `init`

- `pqs`

- `upgrade-check`

- `daml-shell`

The commands you _do_ see mostly come from `damlc` plus `daml-script`, so DPM is likely resolving a reduced component set in that directory rather than the full bundled `3.5.4` SDK.

### 1. Check the current directory and environment

Run:

```haskell
pwd
env | sort | grep -E '^(DPM_|DAML_)'

```

In particular, look for any of these variables:

```haskell
DPM_ASSEMBLY
DPM_SDK_VERSION
DPM_HOME
DAML_PACKAGE
DAML_PROJECT
DPM_MULTI_PACKAGE

```

### 2. Check for project-specific components

Run:

```haskell
find .. -name daml.yaml -o -name multi-package.yaml
grep -R "components:" -n daml.yaml multi-package.yaml ../*/daml.yaml ../*/multi-package.yaml 2>/dev/null

```

If `components:` is present, DPM may be using the explicitly configured components rather than the full SDK bundle.

In that case, make sure `codegen` is included:

```haskell
components:
  codegen:
    version: 3.5.2

```

### 3. Test outside the project

To determine whether this is caused by project-local configuration, try from `/tmp`:

```haskell
cd /tmp
dpm version --active
dpm help

```

If `codegen-java` is present when running dpm on `/tmp`, the issue is almost certainly related to the project-local configuration.

If it is still not present, please send the output of:

```haskell
dpm resolve --output json
cat ~/.dpm/cache/sdk/open-source/3.5.4.yaml
cat ~/.dpm/cache/components/codegen/3.5.2/component.yaml

```

That should show whether DPM is resolving the expected `3.5.4` SDK and whether the `codegen` component is installed and registered correctly.

---

<div class="post-metadata">

**Author:** ![austin](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@austin](https://forum.canton.network/u/austin)\
**Post date:** [August 11, 2026, 11:29pm UTC](https://forum.canton.network/t/codegen-java-dpm/9054/5 "2026-08-11T23:29:26Z")

</div>

It seems like the issue was in my multi-package.yaml file with the components! I only had script and damlc listed, I’ve added codegen and it now appears. Thank you! Do you know what would’ve caused version 3.5.2 to have all commands available by default and then 3.5.4 to need codegen explicity listed in the multi-package.yaml? Maybe a config update?

---

<div class="post-metadata">

**Author:** ![Federico\_Rodriguez](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/federico_rodriguez/32/7339_2.png) [@Federico\_Rodriguez](https://forum.canton.network/u/Federico_Rodriguez)\
**Post date:** [August 12, 2026, 3:19pm UTC](https://forum.canton.network/t/codegen-java-dpm/9054/6 "2026-08-12T15:19:19Z")

</div>

I am not aware of this behavior changing recently. If the project explicitly declares `components`, DPM will resolve the component set from that project configuration. If you remove the components field then you should get the full sdk bundle.

---

<div class="post-metadata">

**Author:** ![austin](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@austin](https://forum.canton.network/u/austin)\
**Post date:** [August 12, 2026, 5:30pm UTC](https://forum.canton.network/t/codegen-java-dpm/9054/7 "2026-08-12T17:30:52Z")

</div>

Ah ok, I’ll give that a shot. Maybe it has something to do with the fact that I have both dpm 3.5.2 and 3.5.4 installed

---

<div class="post-metadata">

**Author:** ![sormeter](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/sormeter/32/280_2.png) [@sormeter](https://forum.canton.network/u/sormeter)\
**Post date:** [August 12, 2026, 8:18pm UTC](https://forum.canton.network/t/codegen-java-dpm/9054/8 "2026-08-12T20:18:20Z")

</div>

yeah if you specify `sdk-version` it will include the full bundle of all the components – which you may or may not need

if you want to more closely control and use only the components of interest, you can use the `components:` block

this can be specified at the multi-package.yaml top-level, and will then inherit down to the individual daml.yaml

if you have one value set at the top level (multi package says sdk-version:3.5.2) and a separate value set within a project (daml.yaml says sdk-version:3.5.4), the child daml.yaml value wins

hope this helps
