I want to provide software which runs on Java. For the software I also would like to provide something which allows users to see if their machine already has Java installed.
It should be like this if it is in macOS
#!/bin/sh
command -v java
How can I achieve what I want? what environment should I use? Windows batch ? or..