BAT: cmd is determined by whether the variable exists java (where a check whether run) and by not displaying call jar cmd window form

Java cmd is determined by whether the variable exists (check whether this run)

File name start.bat

:: Check the current environment, if you can run the Java 
@echo OFF 
the SET check_flag = false 
IF  " to true " == " % check_flag% " ( 
  the Java - Version 
) 
IF not% errorlevel% == 0 (
   echo of Can not RUN the Java, the Check IT.
   echo % ERRORLEVEL%   
  PAUSE 
  GOTO the END 
) 

: the START 
cmd / C Start / B Java - JAR xxx.jar 

: the END

Cmd window does not show the form of calls jar

And under the same path start.bat create start.vbs

Set shell = Wscript.createobject("wscript.shell")
a = shell.run ("start.bat",0)

 

Guess you like

Origin www.cnblogs.com/leonlipfsj/p/11006724.html