1

i have an jar file that is my java application i want create a bat file that is start up of my app when an user click on .bat file should first check java installation and if java is installed run my app and then install jdk and then run my app

@echo off  
if exist %JAVA_HOME% (goto found) else (goto notfound)  

:found  
echo found run application 

goto runapp

:notfound  
echo not found should install it. 
pushd %~dp0
start /b /wait "." jre-7u11-windows-i586.exe
echo "step 1"

goto runapp

:end  

:runapp
pushd %~dp0
java -jar AndroBinderV1.jar

this is my bat file but not work corectly i want this can be able ckeck java installation on windows 32 bit and 64 bit and can be able install an jdk that is behind it.

devnull
  • 118,548
  • 33
  • 236
  • 227
user2601734
  • 575
  • 1
  • 5
  • 12

0 Answers0