I am not quite familiar with the Command Prompt syntax but I have learned a few. Please help. I need to provide a cmd script that will check the existing Java version first (because my application requires jdk7). My idea is, it would only run if it passes the required version of Java and Play! If not, it should prompt the required version and the application won't run. I am trying this cmd file:
@Echo off
Echo Checking Java Version.
if "javac -version" == "1.7.0_51" (
Echo JDK7 Found.
Echo Checking Play! Version.
play
if (%play-version% == "2.2.2") (
Echo "Play! Framework Found."
run
)
ELSE (
Echo Play! Version 2.2.2 Required.
)
) ELSE (
Echo JDK 1.7 Required.
)
Please please help. I really have minimal ideas regarding cmd codes. Thank you!