I was ready to let this question be until I came across the word impossible. Before giving up, maybe take a look at the JNA library. This library is built specifically for accessing native code.
JNA provides Java programs easy access to native shared libraries
without writing anything but Java code - no JNI or native code is
required. This functionality is comparable to Windows' Platform/Invoke
and Python's ctypes.
JNA allows you to call directly into native functions using natural
Java method invocation.
There is an active forum listed in the git README. If nothing else, you can ask/explore whether this issue is one that fits within the capabilities of the library.
But I have to admit, even if possible, it seems like it would require considerable effort as well as being dubious in concept: the setting of the computer hardware's volume is properly in the hands of the computer operator.