101Java Introduction 101Java Introduction and development environment Building Java Introduction programming language introduction
- Machine language: Pure machine code
- Machine language is a 0,1,0,1 binary code that can be executed directly by a computer. Efficiency is the most efficient, but the versatility is not strong, for different hardware needs a different program. Plainly, it is not suitable for people to program.
- Assembly language: 8086 assembly, Win32 assembly,. NET's compilation
- Assembly language: Less efficient than machine languages, with simple mnemonics instead of tedious and tedious 0,1 code. The same versatility is not strong, for different hardware needs to design different languages. The learning curve is larger and requires a lot of hardware knowledge. It has been widely used in some industries because of its special properties.
- Advanced Language:
- High-level language: Programming with natural language (mainly English) that can be identified by human beings, the efficiency is reduced again, but programming difficulty and readability is greatly improved. The portability is good, the practicability is better. More suitable for large-scale development, is now the language of choice for most people. And the advent of the Java language and the. NET platform partly solves the migration difficulties caused by different platforms. Basic, Pascal, Object Pascal, C, C + +, objective-c, Swift, C #, Java, ASP, ASP, Perl, PHP, SQL, FoRTRAN, etc. Visual Basic, Visual Basic.NET, Delphi, Visual C + +, C + + builder, C # Builder, Visual Foxpro, and more
Programming language Categories:
- Compiled (the source code is compiled into an executable file and then executed) such as: C + + objective-c, etc.
- Interpreted (explanation of a row running a line) such as: Python, etc.
Java is both a compiled and interpreted type
Java source code-(JAVAC) > Bytecode-(Java)-Interpretation execution
Machine languages and assembly language
Advanced language
class Demo1 { public static void main(String[] args) { System.out.println("Hello World!"); }}
1 Java language origins
Java is a high-level programming language introduced in 1995 by Sun (Stanford University Network, Stanford University, Inc.). Java name Source Java was originally named Oak, the target of small-scale systems such as household appliances programming language, as the market changes, sun focused on the development of Web applications. Java is the source of the name: Java is the English name of the Indonesian island of Java, known for its rich coffee.
History:
- May 23, 1995, the birth of the Java language prototype
- 1996, 1997 launches jdk1.0,jdk1.1 edition
- 1999, Java was divided into J2se,j2ee,j2me
- 2000, JDK1.4 released
- September 30, 2004 18:00pm,j2se1.5 released as another milestone in the development of the Java language. To indicate the importance of this version, j2se1.5 renamed Java SE 5.0
- In 2005, the Java version was formally renamed Javaee,javase, Javame
- December 2006, Sun Company released JRE6.0
- Oracle bought Sun for $7.4 billion on April 20, 2009. Access to Java Copyright.
- In September 2010, JDK7.0 has been released, adding a simple closure function.
- In July 2011, Oracle released the official version of Java7.
2 Key features of the Java language cross-platform 1. Cross-platform
What is a cross-platform (computer system), cross-platform concept is an important concept in software development, that is, do not rely on the operating system, but also do not trust the hardware environment. Applications developed under one operating system can still run under another operating system.
2. Cross-platform for Java
The "Write once run Anywhere" Java cross-platform is relative to other programming languages, and applications written in the Java language can run on different system platforms. General high-level languages if you want to run on a different platform, you need to compile at least a different target code. In Windows compiled C language program, under Linux is not able to run. Of course, the C language program compiled under Linux will not work under Windows. The Java language does not need to be recompiled when it runs on different platforms. Java Cross-platform principle: Java's cross-platform is implemented through the Java Virtual Machine (JVM).
3 Java's three big platforms
- Javase (Java platform,standard Edition)
- Java SE was formerly known as J2SE. It allows you to develop and deploy Java applications that are used in desktops, servers, embedded environments, and live environments.
- Java SE contains classes that support Java WEB Service development and provides the foundation for Java platform,enterprise Edition (Java EE). Example: Similar to QQ, Minesweeper, Lingbo, such as the desktop application.
- Java EE (Java platform,enterprise Edition)
- This version was formerly known as the Java EE. The Enterprise Edition helps develop and deploy portable, robust, scalable, and secure server-side Java applications. Java EE is built on the basis of Java SE, which provides Web services, component models, management, and communication APIs that can be used to implement enterprise-class service-oriented architecture (service-oriented Architecture,soa) and Web 2.0 applications.
- Java ME (Java platform,micro Edition)
- This version was formerly known as J2ME, also called K-java. Java ME provides a robust and flexible environment for applications running on mobile devices and embedded devices such as mobile phones, PDAs, TV set-top boxes, and printers. Java ME includes a flexible user interface, robust security model, many built-in network protocols, and rich support for Web and offline applications that can be dynamically downloaded. Applications based on the Java ME specification need to be written once, can be used for many devices, and can take advantage of the native capabilities of each device.
4 Construction of the environment
1. Java Virtual Machine (JVM)(You can run a. class file)
- Java Virtual Machine A software simulation of the computer.
- The Java source program is imagined as our C source program, and the bytecode (. Class) generated by the Java source program is equivalent to the compiled binary executable file of the C source program.
- The JVM virtual machine is equivalent to a computer system (operating system + hardware environment) and the Java interpreter is CPU.
- . exe files run directly under the Windows operating system and are machine code (. exe files) running on the CPU
- The. Class bytecode file is run under the JVM virtual machine, and Java bytecode is running on the Java interpreter.
- The Java interpreter is equivalent to "CPU" running Java bytecode, but the "CPU" is implemented by software instead of hardware. * The Java interpreter is actually an application under a specific platform. As long as the interpreter program under a specific platform is implemented, Java bytecode can be run through the interpreter program on the platform, which is the root of the Java cross-platform.
- Currently, not all platforms have a corresponding Java interpreter program, which is why Java does not work on all platforms, it can only run in the implementation of the Java Interpreter program platform.
2. Java Runtime Environment (JRE)(You can run a. java file)
JRE Java Runtime Environment Java operating environment. including Java virtual machines (JVM Java) and the core class libraries required by Java programs, if you want to run a well-developed Java program, you only need to install the JRE on your computer.
3. Java Development Environment (JDK)(Java files can be developed)
-
The JDK (Java development Kit) is a product of Sun Microsystems for Java developers. Since Java was launched, the JDK has become the most widely used Java SDK. The JDK is the core of the entire Java, including the Java Runtime Environment, Java tools, and the Java base Class library. JDK is the first step to learning Java. Starting with Sun's JDK5.0, it provides a very useful feature such as generics, and its version is constantly updated and its operational efficiency has been greatly improved.
-
Installation of the JDK
- Website: http://www.oracle.com/index.html, http://www.java.sun.com
- JDK Directory Introduction
- Bin directory: A compiler, interpreter, and other tools (executables) that store java. Java Javac
- DB directory: JDK7 comes with a lightweight database named Derby.
- Include directory: an interface file that holds the calling system resource.
- JRE Directory: Store Java Runtime Environment files.
- LIB directory: A class library file that holds java.
- Src.zip file: The source code for the class provided by the JDK.
- Things to keep in mind when installing a JDK:
- Do not include Chinese in the installation path.
- Do not include spaces in the installation path.
<wiz_tmp_tag id= "Wiz-table-range-border" contenteditable= "false" style= "Display:none;" >
From for notes (Wiz)
7.11.3 Java Introduction