summaryrefslogtreecommitdiff
path: root/java/07-simple-objects-better-use-jar/myaccountslib
diff options
context:
space:
mode:
Diffstat (limited to 'java/07-simple-objects-better-use-jar/myaccountslib')
-rw-r--r--java/07-simple-objects-better-use-jar/myaccountslib/README11
-rwxr-xr-xjava/07-simple-objects-better-use-jar/myaccountslib/run.sh18
2 files changed, 18 insertions, 11 deletions
diff --git a/java/07-simple-objects-better-use-jar/myaccountslib/README b/java/07-simple-objects-better-use-jar/myaccountslib/README
deleted file mode 100644
index 72a980e..0000000
--- a/java/07-simple-objects-better-use-jar/myaccountslib/README
+++ /dev/null
@@ -1,11 +0,0 @@
-# NOTE:
-# On Windows,
-# 1. Use \ as the directory seperator.
-
-# Compile:
-mkdir bin
-javac --source-path src/ -d bin/ src/*.java
-
-# Build jar file:
-mkdir dist
-jar cf dist/myaccountslib.jar -C bin .
diff --git a/java/07-simple-objects-better-use-jar/myaccountslib/run.sh b/java/07-simple-objects-better-use-jar/myaccountslib/run.sh
new file mode 100755
index 0000000..0395e57
--- /dev/null
+++ b/java/07-simple-objects-better-use-jar/myaccountslib/run.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# This is a Linux executable bash script.
+
+# Delete directories named bin and dist
+rm -rf bin dist
+
+# Create bin directory
+mkdir bin
+
+# Compile .java files inside src directory into bin directory
+javac -d bin src/*.java
+
+# Create dist directory
+mkdir dist
+
+# Create a jar file inside dist directory. Use all the files inside bin directory.
+jar cf dist/myaccountslib.jar -C bin .