hello_world_without_an_ide
This is an old revision of the document!
Table of Contents
Hello World Without an IDE
They say the only way to teach a fish about water is to remove the fish from the water. So in the time honored tradition of writing “Hello World!” (whenever you learn a new computer language), lets try.
We need to type the following Java code as a text file. Java requires that the File name is Capitalized, and ends in .java
.
1. Type the code as a text file
Linux / MacOS
nano First.java
There is a remote possibility nano needs to be installed
DOS / Windows before Win7-64 bit
edit First.java
Windows 7-64 bit and later
notepad First.java
(technically not a command line editor, but they removed that ability for some reason)
Now (in your respective editor) type:
public class First { public static void main(String[] args) { System.out.println("Hello World!"); } }
2. Compile the Code
javac First
3. Execute the Code
java First
hello_world_without_an_ide.1659548427.txt.gz · Last modified: 2022/08/03 13:40 by frchris