Is there any way to detect if the host PC a java app is running on is a Virtual Computer or not? Just want to warn the user that they may ( rarely ) experience issues if using a VM and that we reccomend they use a physical machine if at all possible.
Share
As the linked question explains, yes there are ways.
However, doing this from within a Java app is going to be more tricky. You’ll either need to use
System.exec(...)to run a native application, or use JNI to call a native library to do the job.But frankly:
Why would a pure Java app experience problems on a VM? Can’t you just find the problem and fix it or provide a workaround?
If you can’t, why don’t you just describe the issue in the release notes?