Instructor-led training
Practical Java Language Topics Training in Malmo, Sweden
The Java platform has many powerful capabilities to help developers in the day to day tasks of creating good software systems.
What you'll learn
Private Training for Teams
This course is offered as private, instructor-led training for organizations, onsite in Malmo, Sweden or live online. Dates, delivery format, and course content are arranged around your team's requirements.
This course is not currently scheduled as a public class for individual enrollment.
Request Group TrainingPrerequisites
Course Outline
What makes build, test and logging tools hard to master
The Java syntax in this course is easy for an experienced developer. The harder part is that all three topics are configuration-driven. Ant buildfiles are declarative XML, JUnit finds and runs your tests by convention, and log4j behavior is decided mostly by configuration rather than by the calling code. Mistakes tend to show up as a wrong classpath, a test that never runs, or log lines that go nowhere.
The syllabus builds in layers:
- Ant fundamentals. Projects, targets, tasks and properties come first, then paths (CLASSPATH, PATH) and resource collections: FileSets, DirSets, PatternSets and selectors. Most buildfile problems come from not being clear about which files a collection actually matches.
- Ant tasks and modularity.
<javac>and<java>are covered in depth, followed by<jar>,<war>and<ear>and the file tasks. Properties files, the<ant>task with subprojects, and<import>then split a large build into pieces. A common misconception is that a buildfile is a script that runs top to bottom, when it is really a set of targets and properties. Another is that properties behave like variables you can reassign. - JUnit. The course covers tests and assertions, running tests, and testing for expected exceptions. It then moves to organization:
@Before/@Afterfixtures, suites, and running tests from the Ant<junit>task. The usual traps are tests that depend on each other and assertions that only repeat the implementation. - Logging. The course covers loggers, appenders and layouts, the logger hierarchy, levels and PatternLayout. It closes with Java Logging and Apache Commons Logging. The hard concept is that a message's fate depends on the logger's position in the hierarchy, its level, and the appenders attached, not on the log call itself.
Each module has hands-on labs, so the concepts are practiced against real buildfiles, tests and configuration files.
Who it suits and where it fits
This is a one-day course for programmers who already work in Java and understand object-oriented programming. It suits teams that maintain or inherit Ant-based builds, want a consistent way to write and run unit tests, or need to replace ad hoc console output with configurable logging. It is a tools course, not a language course, so it assumes you can read and write Java without help.
- Before: developers who know OO concepts but are new to Java can start with Fast Track to Java for OO Developers, which builds the language foundation this course assumes.
- After: Advanced Java Language Topics is a natural one-day follow-on for developers who want to go deeper into the language itself.
- Also related: once builds and tests run from Ant, Continuous Integration with Jenkins shows how to run them automatically on every change.
Illustrative scenarios
The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.
- Untangling a large buildfile. A team might maintain one long buildfile that compiles, packages and deploys several components. Using properties files,
<import>and the<ant>task with subprojects, they could split it into shared and per-module buildfiles. FileSets and PatternSets would then control exactly which classes go into each<jar>or<war>. - Adding tests to existing code. For example, a group with untested utility classes could write JUnit tests with assertions and expected-exception checks, share setup through
@Before/@Afterfixtures, group them into suites, and run them from the Ant<junit>task as part of the build. - Making diagnostics controllable. A team that relies on console printing might move to log4j. Loggers named by package, different levels per area, and separate appenders would let support staff raise detail for one subsystem without redeploying. A PatternLayout could standardize the format, and the Commons Logging and Java Logging material would help in choosing how libraries log.
AI coding assistants with these topics
AI coding assistants are useful for the repetitive parts. They can draft a first buildfile skeleton, generate JUnit test methods for a class, or produce a starting logging configuration. They are weaker where details are tool-specific:
- Ant: an assistant may invent task attributes or borrow habits from other build tools. It can also write FileSet patterns that match too many or too few files, or miss how paths and properties resolve across imported buildfiles.
- JUnit: generated tests often just restate the implementation, skip exception cases, or share state between tests that fixtures should isolate. They may also use annotations or APIs that do not match the project's JUnit and Java versions.
- Logging: configuration syntax and class names differ between logging frameworks and between versions of the same framework. A suggested configuration may be silently ignored, or may send messages to the wrong appender or at the wrong level.
To verify, run Ant with verbose output and list the files each resource collection selects, and inspect the contents of the generated archives. Deliberately break the code to confirm that the tests fail. Check the logger hierarchy and levels by emitting a message at each level from several classes and seeing where it lands. Always compare suggestions with the versions your project actually uses.
Frequently asked questions
What level is this course and what should I know first?
It is a one-day, general-level course for programmers who already have experience with Java and object-oriented programming. No prior Ant, JUnit or log4j experience is listed as a prerequisite.
What does the course cover?
Three areas: Ant (buildfiles, properties, paths, resource collections, core tasks such as javac, java, jar, war and ear, and modular builds), JUnit (tests, assertions, exceptions, fixtures, suites and the Ant junit task), and logging (log4j loggers, appenders, layouts, levels and configuration, plus Java Logging and Apache Commons Logging). Each module includes labs.
Can the course be delivered privately for our team?
Yes. HSG delivers private training for organizations, either onsite at your location or live online.
Can the content be customized?
Private training can be tailored, including to the technology versions your organization uses. To discuss your tooling and goals, request a training proposal.Training locations
Practical Java Language Topics training across the U.S. and beyond.
We provide private Practical Java Language Topics training for organizations, onsite at your location or live online, throughout the United States and internationally.
Train your team with HSG
Private, instructor-led training customized for your organization.
- Onsite or live online delivery
- Customized curriculum
- For a single employee or an entire team
- Flexible scheduling
- Experienced instructors
Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com
Ready to train your team?
Let's customize this training for your organization.
Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.