hello_world_without_an_ide
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| hello_world_without_an_ide [2022/08/03 13:18] – created frchris | hello_world_without_an_ide [2024/08/28 09:29] (current) – [Hello World Without an IDE] frchris | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Hello World Without an IDE ====== | ====== Hello World Without an IDE ====== | ||
| - | They the only way to teach a fish about water is to remove the fish from the water. | + | They say the only way to teach a fish about water is to remove the fish from the water. |
| + | We need to type the following Java code as a text file. Java requires that the File name is Capitalized, | ||
| + | Link to | ||
| + | [[https:// | ||
| + | ===== 1. Type the code as a text file ===== | ||
| + | |||
| + | |||
| + | === Linux / MacOS === | ||
| + | |||
| + | <code bash> | ||
| + | nano First.java | ||
| + | </ | ||
| + | There is a remote possibility [[https:// | ||
| + | === DOS / Windows before Win7-64 bit=== | ||
| + | '' | ||
| + | |||
| + | === Windows 7-64 bit and later === | ||
| + | '' | ||
| + | (technically not a command line editor, but they removed that ability for some reason) | ||
| + | ====Now (in your respective editor) type:==== | ||
| <code java> | <code java> | ||
| public class First | public class First | ||
| Line 10: | Line 29: | ||
| } | } | ||
| </ | </ | ||
| - | + | ===== 2. Compile the Code ===== | |
| - | ===== Linux ===== | + | <code bash> |
| + | javac First | ||
| + | </ | ||
| + | ===== 3. Execute the Code ===== | ||
| <code bash> | <code bash> | ||
| - | nano First.java | + | java First |
| </ | </ | ||
| + | |||
| + | ======Summary ====== | ||
| + | Doing this once usually ends with the response "There must be a better way!" Now you will appreciate any IDE, and there are many, but we will focus on two: BlueJ and Eclipse. | ||
| + | |||
| + | Recommended reading: Java Methods (4th ed) Chapter 2 | ||
hello_world_without_an_ide.1659547122.txt.gz · Last modified: 2022/08/03 13:18 by frchris