The wizard is a source-tree scaffold, not a compiler — nothing inside Workbench
turns .java into a module jar. That step happens outside it, and there are two
routes.
What you are building. A Niagara module is a signed jar with one extra
file: next to the classes and the usual jarsigner output there is
META-INF/module.xml, which is what the station reads before it trusts
anything else inside. The runtime profile in the name matters — -rt runs in
the station, -wb only inside Workbench, -ux is the one that reaches a
browser — and one logical module is often several jars, each with its own
module.xml.
Route 1: Tridium’s Gradle build, which is already in your install. It ships
as a flat Maven repository under etc/m2/repository/com/tridium/, with worked
example projects. It needs Gradle 7.6, a plugin version that matches the
install you point it at, and a full system JDK 8 — the JRE inside a Niagara
install is trimmed and has no jar or jarsigner. Those versions are from a
4.15 install; an older one wants an older Gradle. In return it runs the
@NiagaraType annotation processor, so the Type/getType() boilerplate and
the <type> entries are generated rather than typed. It also signs
automatically, with a throwaway self-signed key: fine for the dev loop, not a
route to something shippable.
Route 2: plain javac, no SDK and no licence. Compile against the jars in
the install’s own modules directory, then build the zip yourself. You give up
the annotation processor, which costs two methods per class:
public static final Type TYPE = Sys.loadType(BFoo.class);
public Type getType() { return TYPE; }
plus the matching <type name="Foo" class="..."/> line in module.xml, by
hand. Niagara 4 is Java 8 throughout, so the same source compiles against
whichever install you point javac at.
Then getting it in. On a JACE there is exactly one supported path: Platform
→ Software Manager over the platform connection, pointed at the jar or a
distribution built from it. A jar copied into a directory is not installed,
whatever the build log says. Three failures cover nearly everything:
- Dependency error naming a version — your
module.xml dependency
vendorVersion is a floor, not a pin, and yours is above the station’s
version. Stamp for the oldest station you intend to support.
- Unsigned or untrusted module — the question is never “is it signed”, it is
whether that host’s trust store has that certificate. The same jar installs
on one host and is refused on the next.
- Class not found after a successful install — the type resolved at install
time but lives in a different runtime profile from the code trying to load
it, which is the usual -ux view referencing an -rt-only class.
Full write-up with a minimal module.xml and the stamping detail:
If you post the exact failure line you are getting, it is usually one of those
three.