Build with a full JDK 8 or newer. Obtain the Sweet Home 3D 7.5 source package
from the official project; use its build/SweetHome3D.jar (or application JAR)
and the Java3D 1.6, vecmath, jnlp and other bundled library JARs as classpath.

Example (Unix; SH3D_CP is the colon-separated classpath of those JARs):
  mkdir -p build/classes
  javac -encoding UTF-8 -source 8 -target 8 -cp "$SH3D_CP" -d build/classes src/*.java
  Copy com/eteks/sweethome3d/plugin/terraingenerator/*.properties and terrain.png
  from this archive into the matching path under build/classes.
  jar cf TerrainGenerator.sh3p -C build/classes .
  Include this archive's license and source files when distributing modifications.

Tests use the same classpath plus build/classes and require a graphical display
and Java3D native libraries:
  javac -encoding UTF-8 -source 8 -target 8 -cp "build/classes:$SH3D_CP" -d build/classes tests/*.java
  java -cp "build/classes:$SH3D_CP" com.eteks.sweethome3d.plugin.terraingenerator.IntegrationTests
  java -cp "build/classes:$SH3D_CP" com.eteks.sweethome3d.plugin.terraingenerator.TerrainTests

Run from a writable directory with a terrain/ subdirectory. IntegrationTests
creates its test project there; TerrainTests also uses that generated project.
On Java 17 add --add-exports=java.desktop/sun.awt=ALL-UNNAMED,
--add-exports=java.desktop/sun.java2d=ALL-UNNAMED,
--add-opens=java.desktop/sun.awt=ALL-UNNAMED,
--add-opens=java.base/java.lang=ALL-UNNAMED for the original Java3D 1.6 runtime.
The modifications themselves are compiled to Java 8 bytecode.
