Skip to content

Commit 6b9668c

Browse files
committed
Make nashorn an optional (static) module dependency
nashorn is used only by beastlabs.util.Script and was removed from the JDK. As a hard 'requires' it made the whole beast.labs module unresolvable wherever nashorn is absent, so the package manager skipped the module and every BEASTLabs class became unloadable. BEAUti then crashed on startup parsing the Weibull subtemplate (ClassNotFoundException for beastlabs.math.distributions.WeibullDistribution). Declaring it 'requires static' lets the module resolve without nashorn, matching how beast.fx and javafx.controls are already handled. Fixes #30
1 parent 8a075b6 commit 6b9668c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/module-info.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
requires java.xml;
55
requires java.scripting;
66
requires beagle;
7-
requires org.openjdk.nashorn;
7+
// Optional: only beastlabs.util.Script uses nashorn, which was removed from
8+
// the JDK. A hard 'requires' makes the whole module unresolvable (and thus
9+
// skipped) wherever nashorn is absent; 'static' keeps it optional at runtime.
10+
requires static org.openjdk.nashorn;
811
requires org.apache.commons.statistics.distribution;
912
requires org.apache.commons.numbers.gamma;
1013
requires static beast.fx;

0 commit comments

Comments
 (0)