This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the JavaIntroBook project containing three educational Java books: JavaIntroBook, JavaWorkbook, and JavaReader. The content is authored in AsciiDoc format and published as PDF and EPUB formats for Zip Code Wilmington's Java curriculum.
The repository has three main components:
- IntroAndWorkBook/: Main book content in AsciiDoc format with source files, exercises, and build system
- reader/: JavaReader book with reading exercises and example Java programs for student analysis
- pdfmaker/: PDF generation utilities with custom styling
All build commands should be run from the IntroAndWorkBook/ directory:
cd IntroAndWorkBook
make all # Build all PDFs and EPUBs
make index # Build and preview the main JavaIntroBook PDF
make workbook # Build and preview the JavaWorkbook PDF
make prepress # Build print-ready version
make clean # Remove generated filesThe build system requires:
asciidoctor-pdfgem for PDF generationasciidoctor-epub3for EPUB generation
Install with: sudo gem install asciidoctor-pdf --pre
The book includes a Maven project at IntroAndWorkBook/src/zipcode/ with:
- Java 11 target
- JUnit 4.11 for testing
- Special
ZipCodetemplate class used throughout the book examples
Maven commands for the Java project:
cd IntroAndWorkBook/src/zipcode
mvn compile # Compile Java sources
mvn test # Run tests
mvn clean # Clean build artifactsindex.adoc: Main JavaIntroBook entry pointworkbook.adoc: JavaWorkbook entry pointprintindex.adoc: Print-ready version- Individual topic files:
variables.adoc,classes.adoc,methods.adoc, etc. wk/exercises1.adoc,wk/exercises2.adoc: Exercise collectionsappendixa.adoc,appendixb.adoc,appendixc.adoc: Appendices
The books use a special Java class template for examples:
public class ZipCode {
void compute() {
// Your code goes in here...
}
public static void main(String args[]) { new ZipCode().compute(); }
}This template is referenced throughout the book content and should be maintained when editing examples.
The reader/ directory contains:
- Reading exercises organized by difficulty level (
Level1/,Level3/) - Complete Java programs for analysis (
Programs/) - Pedagogical notes on code reading and comprehension
- Content uses AsciiDoc markup (
.adocfiles) - Java code examples should work with jshell when possible
- Images stored in
IntroAndWorkBook/images/ - Generated outputs go to
pdf/andepub/subdirectories - Custom PDF themes:
indextheme.yml,jspreptheme.yml
When editing book content:
- Edit the
.adocsource files directly - Use
make indexormake workbookto preview changes - Maintain consistency with the ZipCode template pattern
- Test Java examples for correctness
- Ensure code examples are suitable for jshell execution when practical
The build system automatically handles PDF and EPUB generation from the AsciiDoc sources.