Have you watched jUSB ? Of course, it is quite old and does not update, but it looks like the usb.core API works for both Linux and Windows.
It should be noted that, as conveniently, the DeviceDesriptor class, located only in the mentioned usb.core package, provides getVendorId () and getDeviceId ().
source share