You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/pages/learn/01_tutorial/01_your-first-java-app/01_getting-started-with-java.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ You can give this class any name as long as it does not start with a number. The
74
74
75
75
If you are following this example to the letter, you should save the `MyFirstClass` class in a text file called `MyFirstClass.java`.
76
76
77
-
Just a word of warning: you should be using a plain text editor to create and save this file. Using a word processor like Microsoft Word or Google Docs will not work.
77
+
Just a word of warning: you should be using a plain text editor to create and save this file. Using a word processor will not work.
78
78
79
79
<aid="first-compilation"> </a>
80
80
## Preparing the Compilation of your First Class
@@ -94,7 +94,7 @@ You may also have heard about J2EE, Java EE or Jakarta EE. All these acronyms re
94
94
<aid="setting-up-jdk"> </a>
95
95
## Setting up a Java Development Kit
96
96
97
-
You can download the JDK from different places. There is a one-stop page that always refers to the latest version of the JDK: https://jdk.java.net/. Selecting a JDK version listed under the label, "Ready for use" redirects you to a page where you can download the version of the JDK you need.
97
+
You can download the JDK from different places. There is a one-stop page that always refers to the latest version of the JDK: https://jdk.java.net/. Selecting a JDK version listed under the label "Ready for use" redirects you to a page where you can download the version of the JDK you need.
98
98
99
99
From this page you can download four versions:
100
100
@@ -265,9 +265,9 @@ All the commands you will be typing now should be typed in the same prompt as th
265
265
266
266
### Compiling and Running Your First Java Program
267
267
268
-
The following instructions are the same regardless of if you followed the the Windows, the Linux or the macOS path.
268
+
The following instructions are the same regardless of if you followed the Windows, the Linux or the macOS path.
269
269
270
-
1. Change to the directory where you saved your first class, `MyFirstClass.java`. You can check that you are in the right directory by typing `dir` (for Windows) `ls` (for macOS or Linux). This command will list the files you have in this directory. You should see your `MyFirstClass.java` file in that list.
270
+
1. Change to the directory where you saved your first class, `MyFirstClass.java`. You can check that you are in the right directory by typing `dir` (on Windows) or `ls` (on macOS or Linux). This command will list the files you have in this directory. You should see your `MyFirstClass.java` file in that list.
271
271
2. Check that your compiler is accessible from this directory by typing this command (it should work whether you are on Windows or Linux):
272
272
273
273
```shell
@@ -364,7 +364,7 @@ javac: Command not found
364
364
365
365
If you receive this error, UNIX cannot find the compiler, [`javac`](doc:javac).
366
366
367
-
Here's one way to tell UNIX where to find `javac`. Suppose you installed the JDK in `/usr/local/jdk19`. At the prompt, type the following command and press \<Return\>:
367
+
Here's one way to tell UNIX where to find `javac`. Suppose you installed the JDK in `/usr/local/jdk19`. At the prompt, type the following command and press \<Enter\>:
368
368
369
369
```shell
370
370
/usr/local/jdk19/javac HelloWorldApp.java
@@ -426,7 +426,7 @@ One of the places where `java` tries to find your `.class` file is your current
426
426
cd c:\java
427
427
```
428
428
429
-
The prompt should change to `C:\java>`. If you enter `dir` at the prompt, you should see your `.java` and `.class` files. Now enter `java HelloWorldApp` and press \<Return\> again.
429
+
The prompt should change to `C:\java>`. If you enter `dir` at the prompt, you should see your `.java` and `.class` files. Now enter `java HelloWorldApp` and press \<Enter\> again.
430
430
431
431
If you still have problems, you might have to change your `CLASSPATH` variable. To see if this is necessary, try clobbering the classpath with the following command.
432
432
@@ -456,7 +456,7 @@ Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp
456
456
457
457
If you receive this error, `java` cannot find your bytecode file, `HelloWorldApp.class`.
458
458
459
-
One of the places where `java` tries to find your bytecode file is your current directory. So, for example, if your bytecode file is in `/home/jdoe/java`, you should change your current directory to that. To change your directory, type the following command at the prompt and press \<Return\>:
459
+
One of the places where `java` tries to find your bytecode file is your current directory. So, for example, if your bytecode file is in `/home/jdoe/java`, you should change your current directory to that. To change your directory, type the following command at the prompt and press \<Enter\>:
460
460
461
461
```shell
462
462
cd /home/jdoe/java
@@ -496,7 +496,7 @@ This first Java program showed you the basic steps every Java developer follows
496
496
497
497
Developers that work on large applications do not use plain text editors to manage their source code; they use Integrated Development Environments, or "IDEs". IDEs are complex software applications, specialized in software development. These applications handle the compilation of your source code automatically, help you track errors in the syntax of your Java code and nail down bugs in its execution, among other things.
498
498
499
-
Some of these tools are open-source and free to use.
499
+
Some of these tools are opensource and free to use.
500
500
501
501
- [`the Eclipse foundation maintains Eclipse`](doc:ide-eclipse),
502
502
- [`the Apache foundation maintains NetBeans`](doc:ide-netbeans),
0 commit comments