Learning to Compile a Java Class From Scratch
Lets explore how you can compile a Java file from scratch without an IDE or other tool. All you will need to be able to do this is the Java Development Kit (JDK). This process is admittedly not one you'll want to do often, but is nice to know. I find understanding what my tools are doing behind the scenes and how the platform I'm working on works extremely useful when working with them.
This process uses two programs. `javac` is the Java Compiler which compiles a `.java` file from the code you have written into java's intermediary language - the Java Byte Code. Java byte code is what is actually read by your computer. Once we have Java Byte Code we will need something that can run it. This is where the `java` command comes in. Given a `.class` file (the compiled byte code file) the `java` command can run that program in the Java Runtime Environment. This is what makes your code actually run!
There is a lot more possibilities behind how all of this can work, but the goal here is to cover the basics of what's going on and step through how to do them. If you want to explore the more complex parts of this like building `.jar` files and running them there is plenty of documentation online to get you started (or leave a comment and I'll see if I can get to it!).
In order to run and your java class you will need to use `javac` to compile the java file and then run the compiled byte code using `java`. If your java class was named `test.java` you would run this:
```sh
javac test.java
# This will output test.class
# Now we run the class we compiled
java test
```
You'll need to a version of the JDK installed to run this code. If you have installed the JDK but do not see `java` or `javac` as options in your command-line you may need to add the JDK to your `PATH`. Your systems `PATH` is used to scan for binary commands inside your shell. How you modify this will depend on your operating system.
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Learning to Compile a Java Class From Scratch», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.