All language subtitles for 008 Terminal Commands (Mac)_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

This video is for Mac.

If you're using a Windows computer, please go to the next lesson.

Every developer should know how to use their terminal.

So far, you learned how to run your code using the run button.

Now, the run button is nice, but it's really important that you learn how to use your terminal.

So in this lesson, you will run your code using terminal commands.

Java C means Java compiler.

So in step one, the Terminal command Java C is going to compile your Java code into bytecode.

Specifically, we want to compile the code inside of Helo Java Java.

So tell your terminal we want the Java compiler Java C to compile the code inside of Hello, Java.

Java.

By doing so, the Java compiler will compile all of the Java code into a format called Bytecode.

The compiled bytecode is going to live inside of a dot class file.

From Vsco.

You can open up a new terminal by going over to terminal.

New terminal.

If the debug console shows up for you, feel free to dismiss it.

And your terminal should automatically point to section one the Hello Java Java file that lives inside

of Section one.

So over here we can compile the code inside of it.

Java Compiler and Java C.

And now press tab.

By pressing tab.

It guesses the file that I'm trying to compile by looking inside of the folder Section one.

There's only one file inside of section one so it auto completes.

Hello.

Java.

Java.

And now you can compile your Java code.

But anyways, by applying the Java Command on our Java file, the Java compiler compiled all of its

Java code into byte code, and the byte code lives inside of a dot class file.

In step number two, the Terminal command Java executes the compiled code.

So to summarize, the Java Sea Command compiles your code.

And the Java Command executes the compiled code by design.

The Java Sea Command includes the Java extension.

The Java Command does not.

So please be very careful when writing your commands.

All right, Back to our project.

We will write Java and then press tab.

It's going to autocomplete based on what it finds inside of Section one.

Do not add a Java extension at the end.

Just like that, it's able to run the compiled code.

What these two commands are doing is pretty much what the run button was doing for us behind the scenes.

But I want you to be comfortable running terminal commands, so I'm going to keep using terminal commands

throughout this course.

Now, let's say I want to re execute the compiled code instead of rewriting this command.

What I can do is press the up key.

The up key remembers previous terminal commands and we can use it to re execute the compiled code as

many times as we want.

Awesome.

Remember that when you execute your code, Java looks for the entry point main, it tries to find it

and once it finds main, it runs the code inside the first line of code inside main prints.

Hello Java.

Then it looks for more code inside main, but there isn't any so it reaches the end.

All right.

With that being said, I need to warn you to always compile your code first.

When you make changes to your code, compile it first using Java C and then run the compiled code using

the Java Command.

Let's look at an example where I don't do that, so I'm going to change the message to Greetings Java.

And now I would expect that by running this code, it should print this message.

So just run the code without compiling Java.

Hello?

Java.

And it still prints.

Hello, Java.

And that's because you're running the old compiled code.

When you make changes to your code, you need to recompile it using Java Sea.

Java Sea.

Hello?

Java.

Java.

And then execute the newly compiled code with the Java Command.

Java.

Hello, Java.

And once you do that, it executes the new code.

With that being said, congratulations.

You executed your code using Java commands.

So far you learn that all of your code must exist in a Java class.

You created a class called Hello Java.

Manage the entry point.

This is where Java starts running your code.

And finally, you can use the Java Sea Command to compile your code and the Java Command to execute

the compiled code.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.