-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.cmd
44 lines (36 loc) · 928 Bytes
/
makefile.cmd
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
@echo off
rem Check if Java JRE is installed
where java > nul 2>&1
if %errorlevel% neq 0 (
echo Java JRE is not installed. Please install Java JRE.
goto :eof
) else (
echo Java JRE is installed.
java -version
)
rem Check if Java JDK is installed
where javac > nul 2>&1
if %errorlevel% neq 0 (
echo Java JDK is not installed. Please install Java JDK.
goto :eof
) else (
echo Java JDK is installed.
javac -version
)
rem Continue only if Java JRE and JDK are installed
rem Compile the Java code
echo Compiling the Java code...
javac -Xlint:unchecked ./javacrypt/*.java
rem Set variables
echo Setting variables...
set "manifestPath=manifest.mf"
set "classFilesPath=javacrypt/*.class"
set "jarFilePath=JavaCrypt.jar"
rem Create the JAR archive
echo Creating the JAR archive...
jar cfm %jarFilePath% %manifestPath% %classFilesPath%
rem Delete JAVA Class
cd javacrypt
del *.class
cd ..
@echo on