so, i dug out a usb gps device i had for windows and which i haven't
fired up in years, and certainly not on my current device.
plugged it in, and it automatically found and installed a driver and reported
it was active on com10.
i searched a little and found this link for a java library for gps:
https://sourceforge.net/projects/javagps/
it claims it can access gps devices from within
any java application.
library, source, dox all included in download. warning: an example
"run.bat" will fail. it seems to assume you're running a mapping app.
other similar libraries i saw also assume you're running some kind of
mapping app (which may or may not be true in your case).
back in the day, microsoft had a mapping app into which you could
plug an exterior gps device. that's how i used mine.