In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the C language, Java, JavaScript compilation and operation of what is, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor with you to understand.
The compiling and running mode of C language
Take C language as an example, if we want to write a program in C language, we need to first write a cpp file in C language, and then use a compiler to compile it into an executable file. Executable files are made up of binary machine code, but different machines have different CPU (different machine code) and different systems (different executable file formats), so they compile different binaries. For example, Windows compiles files like obj,lib,dll,exe, while Linux compiles files like .o, .a, .so. There is no common use between them. So a source code needs to be recompiled to get the corresponding executable file to run on different computers.
The way Java compiles and runs
Java is different from C language in that developers write java files with Java and compile them with Java compiler to get java class files (this file is also called Java bytecode file, which is similar to machine code, but the machine code runs directly on CPU, while the bytecode runs on the Java virtual machine). Then run the class file on the virtual machine of the corresponding system. Although different computers have different operating systems and different CPU, the Java virtual machines they install provide a unified interface for Java code. As long as the target machine can install the Java virtual machine, the class file of Java can run on the target machine.
The operation of interpretive languages such as JavaScript
Unlike Java, JavaScript requires the source code to be compiled and then run in the Java virtual machine, while JavaScript runs the source code directly into the JavaScript interpreter. This approach also makes JavaScript portability very strong. However, because JavaScript has not experienced compilation, the interpreter takes on extra work when running JavaScript code, resulting in inefficiency.
Thank you for reading this article carefully. I hope the article "what is the compilation and operation of C language, Java and JavaScript" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.