FAQ: Hello World: Java - Compilation: Catching Errors

This community-built FAQ covers the “Compilation: Catching Errors” exercise from the lesson “Hello World: Java”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn Java

FAQs on the exercise Compilation: Catching Errors

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

The terminal does not work, so I can’t proceed. I cannot click inside of it, because there seems to be something loading constantly (icon on top of the screen). Kind of lame to run into something like this so early on, as you can’t skip the exercise…

4 Likes

Same here :frowning: I hope it will be fixed

Having the same issue - plus we cannot bypass the exercise to move on.

1 Like

I’m having an issue with the terminal - I’m typing “javac Compiling.java” as instructed but the terminal just says “command not found” in an infinite loop. Can’t skip the lesson either, disappointing.

4 Likes

I don’t know if any of you are still having issues with the exercise, but I got stuck on the second instruction.
What worked for me was to add the semicolon (as the third instruction states) than type ls in the terminal and press enter. This was accepted and I moved on to the next instruction.
That still left me with the third instruction, which I’d already done to get passed the second. Eventually I removed the semicolon, added it again and clicked on check work at the bottom of the terminal.
That worked for me and I hope it’ll help some of you as well.

In my case, I had to remove the semi column and clicked on “Check Work” before being able to proceed.

I do not know where the terminal is… could you tell me?

1 Like

I can’t figure out how to do the second instruction; I literally type 1s into the terminal like it says and I get an error message that asks if I ran 1s in the terminal.

I’ll point it out here too: the command to run is

ls

That’s two lowercase letters, L and S. The first is not a one.
This command is short for “list”. On unix-compatible shells, it lists the files present in the current directory.

1 Like

Je ne sais pas où est le terminal…

Same as all of you…
I’m having trouble with this lesson.
I’ll be thankful if you are able to answer my questions.

  1. Where is the terminal? (I am a beginner to Java)
  2. For some strange reason, it keeps on not working… Probably because I placed it in the wrong spot?

Your screen should be divided into 3 panes. The left is the instruction pane. The center is the code editor, and the right pane is the terminal. When the instructions ask for interaction with the terminal, you type the commands just to the right of the $ prompt. You should see a flashing cursor in that position. Give a left mouse button click near the cursor, and type away! :slightly_smiling_face:

P.S. Something else that seems to trip people up fairly often is the ls command referred to in the 2nd instruction. It’s lowercase LS not the number 1 and s. :wink:

1 Like

I can’t get past step 3. I got steps 1-2 done just fine, but the terminal is not accepting the semi-colon. I, too, am stuck. Did anyone find a way to get past this?

Hello, @systemsurfer68197. Welcome to the forum!
After you add the missing semicolon in the code editor (middle pane), you need to click the Check Work button at the bottom of the console (right pane). Is that what you’ve tried?

I did :slight_smile: It was glitching or something. I ended up refreshing the page and that’s what it took for the update to go through. Thankfully, I’m on the next lesson now. Thank you so much for responding!

1 Like

Glad you were able to move forward. Refreshing your browser is a fairly common necessity as you work through the lessons. The console in the far right pane seems to lose it’s connection fairly often especially if we let it sit idle for several minutes. I try (don’t always remember) to copy my code in the code editor prior to refreshing the browser, just in case the last edits haven’t been saved. Good luck moving forward && happy coding!

Hi, I was doing the third step and i put in javac Compiling.java; and it says it is wrong.
Could someone help me?

Thank you

You’ll need to examine the situation closer than that.

Who is it?
Does it say “IT IS WRONG” or does it describe what is wrong? If the latter then great, you’ve now got information about the problem.

It says I haven’t put a semicolon (:wink: at the end but I have.