I've read other questions regarding this same issue on StackOverflow, but none of them worked for me. I'm using jna 5.8.0, but every time I try to make this work the wallpaper is set to Black. I get no error messages whatsoever
public class Main {
public static void main(String []args) {
windowsChange("INSERT IMAGE PATH HERE");
}
interface User32 extends Library {
User32 INSTANCE = (User32) Native.load("user32",User32.class,W32APIOptions.DEFAULT_OPTIONS);
boolean SystemParametersInfo (int one, int two, String s ,int three);
}
static void windowsChange(String path) {
User32.INSTANCE.SystemParametersInfo(0x0014, 0, path , 1);
}
}
I have no experience at all with jna, nor interfacing with the OS. Is there a solution to this?