From d1d266096beb3c66dd6c34056e2823465ab40f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ibhear=20=C3=93=20hAnluain?= Date: Sat, 12 Aug 2017 20:21:55 +0100 Subject: [PATCH] Lesson 2 --- docs/javaBootcampNoEclipse.org | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/javaBootcampNoEclipse.org b/docs/javaBootcampNoEclipse.org index 139bb6a..e1553b9 100644 --- a/docs/javaBootcampNoEclipse.org +++ b/docs/javaBootcampNoEclipse.org @@ -74,3 +74,29 @@ : ${DEV_HOME}/source/java/org/gibiris/javaBootcampNoEclipse/MyHelloWorldServlet.class If this is the case, move on to lesson 2: : git checkout lesson-2 + +** Lesson 2 -- build the jar file + +*** Starting point + A clean git working area with two additional class files + +*** Goal + Class files archived into a jar file + +*** Steps + 1. Decide whether you want to include the source (=*.java=) files + in the jar file + 2. Determine other files to be included in the jar file + (e.g. config files, property files, etc.) + 3. Change to the top-level of the package in the source: + : cd ${DEV_HOME}/source/java + Create the =lib/= directory to take the jar file: + : mkdir -pv ../lib + If you're *not* including the source files in the jar: + : jar cvf ../lib/javaBootcampNoEclipse.jar org/gibiris/javaBootcampNoEclipse/*.class + If you *are* including the source files in the jar: + : jar cvf ../lib/javaBootcampNoEclipse.jar org/gibiris/javaBootcampNoEclipse/* + 4. If the successful, you will now have a new file: + : ${DEV_HOME}/source/lib/javaBootcampNoEclipse.jar + If this is the case, move on to lesson 3: + : git checkout lesson-3