mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-05 17:45:52 +01:00
Use JAVA_HOME on windows if defined
This commit is contained in:
parent
f3136bc52b
commit
54c3cfedf5
@ -3,6 +3,12 @@ setlocal
|
||||
set BASENAME=apktool_
|
||||
chcp 65001 2>nul >nul
|
||||
|
||||
set java_exe=java.exe
|
||||
|
||||
if defined JAVA_HOME (
|
||||
set java_exe="%JAVA_HOME%\bin\java.exe"
|
||||
)
|
||||
|
||||
rem Find the highest version .jar available in the same directory as the script
|
||||
setlocal EnableDelayedExpansion
|
||||
pushd "%~dp0"
|
||||
@ -30,7 +36,7 @@ if "%ATTR:~0,1%"=="-" if "%~x1"==".apk" (
|
||||
)
|
||||
|
||||
:load
|
||||
java -jar -Duser.language=en -Dfile.encoding=UTF8 "%~dp0%BASENAME%%max%.jar" %fastCommand% %*
|
||||
%java_exe% -jar -Duser.language=en -Dfile.encoding=UTF8 "%~dp0%BASENAME%%max%.jar" %fastCommand% %*
|
||||
|
||||
rem Pause when ran non interactively
|
||||
for /f "tokens=2" %%# in ("%cmdcmdline%") do if /i "%%#" equ "/c" pause
|
||||
|
Loading…
Reference in New Issue
Block a user