מה זה תכנות? JVM, JDK, IntelliJ ו-jshellWhat is programming? JVM, JDK, IntelliJ & jshell
איך מחשב מבצע הוראות, איך Java רצה (קוד, javac, bytecode, JVM), התקנת JDK ו-IntelliJ ב-Windows וב-Mac, jshell, והתוכנית הראשונה.
How a computer follows instructions, how Java runs (source, javac, bytecode, the JVM), installing the JDK and IntelliJ on Windows and Mac, jshell, and a first program.
בסוף המפגש תדעוBy the end you will
- להסביר במילים שלכם מה זה תוכנית, מה עושה ה-מהדר ומה עושה ה-JVMExplain in your own words what a program is, what the compiler does and what the JVM does
- להתקין JDK 21 ו-IntelliJ IDEA ולבדוק שהכול עובד, ב-Windows או ב-MacInstall JDK 21 and IntelliJ IDEA and check that everything works, on Windows or Mac
- לקמפל ולהריץ מהטרמינל עם
javacו-java, ומ-IntelliJ עם המשולש הירוקCompile and run from the terminal withjavacandjava, and from IntelliJ with the green triangle - להכיר את המבנה של תוכנית Java: מחלקה, main, בלוקים ו-משפטיםKnow the shape of a Java program: class, main, blocks and statements
- להשתמש ב-
println,printו-printfולנסות שורות ב-jshellUseprintln,printandprintf, and try lines out in jshell - להבדיל בין שגיאת קומפילציה ל-חריגה, ולקרוא את שתיהן בלי להיבהלTell a compile error from an exception, and read both without panic
לפני שמתחיליםBefore you start
זמן: Time: כ-3 שעות (כולל הפסקה)About 3 hours (with a break)
דרישות קודמות: Prerequisites: אין. באמת אין. אם אתם יודעים להדליק מחשב ולהקליד, אתם מוכנים.None. Really none. If you can turn on a computer and type, you're ready.
מה צריך: You need: מחשב Windows או Mac עם חיבור לאינטרנט, והרשאה להתקין תוכנות.A Windows or Mac computer with internet access, and permission to install software.
סדר המפגשSession plan
- 0:00היכרות: מה נבנה בקורסWelcome: what we will build
- 0:15מה זה תכנות ולמה JavaWhat programming is and why Java
- 0:30איך Java רצה: javac, bytecode ו-JVMHow Java runs: javac, bytecode and the JVM
- 0:50התקנת JDK 21 (Windows / Mac)Installing JDK 21 (Windows / Mac)
- 1:15הפסקהBreak
- 1:25IntelliJ והתוכנית הראשונהIntelliJ and the first program
- 1:50מבנה תוכנית, println, print ו-printfProgram shape, println, print and printf
- 2:15jshell ושני סוגי שגיאותjshell and the two kinds of errors
- 2:30תרגולPractice
- 2:55סיכום ושאלותWrap-up and questions
המפגש הראשון הוא "יום ההתארגנות": מבינים מה זה תכנות ואיך Java רצה (קוד, מהדר, bytecode ו-JVM), מתקינים JDK ו-IntelliJ, כותבים ומריצים את התוכנית הראשונה, ומנסים שורות ב-jshell. אם משהו לא עובד בהתקנה, זה קורה לכולם: בשביל זה יש מדריך טכני.
The first session is "setup day": we understand what programming is and how Java runs (source, compiler, bytecode and the JVM), install a JDK and IntelliJ, write and run the first program, and try lines in jshell. If something breaks during setup, it happens to everyone: that's what the tech guide is for.
הפרויקט המלווהThe companion project: מדף: ספרייה אישיתShelf: a personal library
פרויקט אחד שגדל איתכם לאורך כל הקורס: מתחיל כתוכנית של 10 שורות, הופך למחלקות, ל-interfaces ול-streams, מייבא ספרים במקביל עם Threads, ונגמר כ-REST API.
One project that grows with you through the whole course: it starts as a 10-line program, becomes classes, interfaces and streams, imports books in parallel with threads, and ends as a REST API.
השלב של היוםToday's step תוכנית ראשונה: באנר פתיחה וספר אחד על המסךFirst program: a welcome banner and one book on screen. לתרגילGo to the exercise