Module 5 ยท A real program, end to end Lesson 15 of 15
Packaging, running and publishing
A jar that runs with java -jar, a README that says how to build it, and a Git repository a reviewer can open - that trio turns 'I know Java' into something someone can check.
The concept
Interviewers rarely run your code, but the README and the commit history are read. A clean repo with small commits says more about how you work than a resume bullet.
For a bigger project Maven or Gradle is expected; for a first jar the plain javac and jar commands are enough and show you understand what the tool would do for you.
javac -d out $(find src -name '*.java')
jar cfe app.jar Main -C out .
java -jar app.jar
git init && git add . && git commit -m "Console student report"
git remote add origin <url> && git push -u origin mainWorked example
javac -d out src/*.java then jar cfe app.jar Main -C out . gives one file; java -jar app.jar runs it anywhere Java is installed.
Your practice task
Build a runnable jar for your console app, write the README, and push it to GitHub.
Do this before moving on. Reading a solution teaches the shape of it; typing it teaches you.
Key takeaway
Interviewers rarely run your code, but the README and the commit history are read.
Keep your place in this course
A free account saves which lessons you have finished and unlocks the certificate. The lesson itself stays free to read.
Create free account or sign inCourse complete
You finished every lesson.
Your certificate is ready, and the projects you built are the proof to attach to an application.
Almost there
15 lessons left of 15
Finish every lesson to unlock the certificate. Each one ends in a practice task โ do them and the final project brief writes itself.