-
Notifications
You must be signed in to change notification settings - Fork 1
/
Executor_Java.bat
55 lines (55 loc) · 2.37 KB
/
Executor_Java.bat
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
55
@ECHO OFF
REM GitHub Link:https://github.com/garvit-joshi/Java_Executor-Windows
ECHO WELCOME TO JAVA EXECUTOR
ECHO -Garvit Joshi(garvitjoshi9@gmail.com)
ECHO USER:%USERNAME%
ECHO v: 1.2012.9+
echo.
ECHO JAVA version installed:
ECHO -------------------------------------------------------------------------
java -version
ECHO -------------------------------------------------------------------------
cd /d "%~dp0"
:first
SET /A ErrorCode = 0
ECHO LOOKING FOR FILES IN:"%~dp0"
echo.
ECHO Name Of Java Executable Files Present In Folder Are:
python filename_java.py
set /p inp1=<Input.txt
echo.
ECHO =====================================================================================================================
IF NOT [%inp1%]==[] (
javac %inp1%
SET /A ErrorCode = %ERRORLEVEL%
ECHO ErrorCode: %ErrorCode%
)
ECHO =====================================================================================================================
echo.
ECHO Name Of Java Executable Class Present In Folder Are:
python filename_class.py
set /p inp2=<Input.txt
echo.
ECHO =====================================================================================================================
IF NOT [%inp1%] == [] (
IF %ErrorCode% == 0 (
echo.
) ELSE (
javac %inp1%
)
)
ECHO =====================================================================================================================
echo.
ECHO =====================================================================================================================
ECHO OUTPUT:
ECHO =====================================================================================================================
IF NOT [%inp2%]==[] (
java %inp2%
)
ECHO =====================================================================================================================
echo.
pause
ECHO =====================================================================================================================
ECHO *********************************************************************************************************************
ECHO =====================================================================================================================
goto first