First to say, I am not experienced with batch-scripts at all.
As the title already tells, I am trying to figure out if java is installed on the system or not, from a bat-file. I already checked many ways to do so but most of them seem more complex than what it should take to get this done.
My idea so far was to save the result of java -version into a variable and then check if there actually was an result, or if the command java couldn't be found. Sadly I couldn't even figure out, how to get the output of java -version saved to a variable so i could compare it.
If someone can help me with my idea or has a different simple solution to my problem i would be glad if you could help me out. Thanks.