-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcheck_java.bat
More file actions
55 lines (48 loc) · 1.41 KB
/
Copy pathcheck_java.bat
File metadata and controls
55 lines (48 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@echo off
echo ========================================
echo WalletConnect V2 DApp - Java Check
echo ========================================
echo.
echo Checking Java installation...
java -version >nul 2>&1
if %errorlevel% neq 0 (
echo ❌ Java is NOT installed!
echo.
echo Please install Java JDK 17:
echo 1. Go to: https://adoptium.net/temurin/releases/?version=17
echo 2. Download Windows x64 installer (.msi)
echo 3. Install with default settings
echo 4. Set JAVA_HOME environment variable
echo 5. Add %%JAVA_HOME%%\bin to PATH
echo 6. Restart terminal and run this script again
echo.
pause
exit /b 1
)
echo ✅ Java is installed!
java -version
echo.
echo Checking JAVA_HOME...
if "%JAVA_HOME%"=="" (
echo ❌ JAVA_HOME is not set!
echo.
echo Please set JAVA_HOME:
echo 1. Press Win+R, type 'sysdm.cpl', press Enter
echo 2. Go to Advanced tab → Environment Variables
echo 3. Under System Variables, click New
echo 4. Variable name: JAVA_HOME
echo 5. Variable value: C:\Program Files\Eclipse Adoptium\jdk-17.x.x-hotspot
echo 6. Add %%JAVA_HOME%%\bin to PATH variable
echo 7. Restart terminal and run this script again
echo.
pause
exit /b 1
)
echo ✅ JAVA_HOME is set to: %JAVA_HOME%
echo.
echo Now you can build the project:
echo 1. Run: gradlew clean
echo 2. Run: gradlew build
echo 3. Run: gradlew assembleDebug
echo.
pause