Complete build guide for compiling the native C++17 virtual display bridge and packaging the Java JAR.
- Windows 10 or 11 (64-bit)
- JDK 17+ (Eclipse Adoptium or Oracle JDK)
- Visual Studio 2022 or 2026 (Community, Professional, or Enterprise) with "Desktop development with C++" workload
- Windows 10/11 SDK (installed with Visual Studio)
- Maven 3.9+
FastMonitor includes an intelligent compilation script with automatic Visual Studio and JDK discovery:
# In the FastMonitor repository root:
compile.batWhat compile.bat does automatically:
- Queries
vswhere.exeto locate the latest installed Visual Studio (VS 2026 or VS 2022). - Initializes the 64-bit developer environment (
vcvars64.bat). - Auto-detects
JAVA_HOMEif not already set. - Compiles
native/fastmonitor.cppwith/O2optimization and links against the Windows display, PnP, SetupAPI, and device-installation libraries. - Deploys
fastmonitor.dlldirectly to:native/fastmonitor.dllsrc/main/resources/native/fastmonitor.dll(for inclusion inside JARs)%USERPROFILE%\.fastcore\native\fastmonitor\fastmonitor.dll(for runtime lookup by FastCore)
- The JAR does not bundle driver packages. If the MttVDD device is missing, FastMonitor downloads fixed MikeTheTech VDD and NefCon release assets from GitHub, verifies their SHA-256 hashes, then requests normal Windows administrator approval for installation. Driver setup requires an internet connection; the installed driver package remains on the system after the demo removes its temporary device node.
Once the native DLL is compiled, build and install the module to your local Maven repository:
# Build and install to ~/.m2/repository
mvn clean install -DskipTestsIf you prefer building manually from a Visual Studio Developer Command Prompt:
cd native
cl /LD /EHsc /O2 /W3 /nologo ^
/I"%JAVA_HOME%\include" ^
/I"%JAVA_HOME%\include\win32" ^
fastmonitor.cpp ^
/link ^
user32.lib ^
gdi32.lib ^
setupapi.lib ^
cfgmgr32.lib ^
newdev.lib ^
shell32.lib ^
/OUT:fastmonitor.dll ^
/MACHINE:X64