Vladimir Vainer
08/19/2025, 3:33 PMSystem.getProperty("java.home")
Returns path to JRE, not JDK.
Is there a simple way to achieve this? Thanksjw
08/19/2025, 3:37 PMjw
08/19/2025, 3:38 PMjw
08/19/2025, 3:38 PMVladimir Vainer
08/19/2025, 3:40 PMjw
08/19/2025, 3:41 PMjw
08/19/2025, 3:41 PMjw
08/19/2025, 3:42 PMjw
08/19/2025, 3:42 PMVladimir Vainer
08/19/2025, 3:42 PMjw
08/19/2025, 3:44 PMVladimir Vainer
08/19/2025, 3:45 PMVladimir Vainer
08/20/2025, 2:37 AMpub fn build(b: *std.Build) !void {
// The Windows builds create a .lib file in the lib/ directory which we don't need.
const deleteLib = b.addRemoveDirTree(.{ .cwd_relative = b.getInstallPath(.prefix, "lib") });
b.getInstallStep().dependOn(&deleteLib.step);
try setupTarget(b, ere&deleteLib.step, .linux, .aarch64, "aarch64");
try setupTarget(b, &deleteLib.step, .linux, .x86_64, "amd64");
try setupTarget(b, &deleteLib.step, .macos, .aarch64, "aarch64");
try setupTarget(b, &deleteLib.step, .macos, .x86_64, "x86_64");
}
Here you add deleteLib.step dependency for every target but its only needed on windows.
So when you compile the linux target it will try to delete the non existing lib file?jw
08/20/2025, 2:39 AMjw
08/20/2025, 2:39 AMjw
08/20/2025, 2:40 AM