Home > Back-end >  Java development prelude
Java development prelude

Time:09-19

1. Basic computer
Computer
1.1.Electronic computer, commonly known as the computer, it is a kind of can according to the program is run, automatic, high-speed processing mass data of modern intelligent electronic devices, is composed of hardware and software, computer called a bare-metal did not install any software,

1.2. The hardware and software1.2.1. Hardware
1. The CPU is the core operation of a computer and control core, and its function mainly explain data in a computer instruction and dealing with computer software, the CPU by arithmetic unit, controller, registers, cache and data of contact between them and the state of the control and bus, as the core of the whole system, the CPU is the highest execution unit, the whole system so that the CPU has become the core component of computer performance decision, many users it as standard to judge the grade of the computer, CPU frequency, the CPU kernel work Clock frequency (CPU Clock Speed), the Clock Speed faster, the more instruction within the time period, the core is the 2 g - 3 g (1 g is a 10000 MHZ), for example, 2 MHZ (2 million times/SEC), 3 GHZ (three billion times/SEC),

2. Memory is a bridge to communicate data to the CPU, all programs running in the computer are in the Memory, the Memory (Memory) is also called internal Memory, its function is used to temporarily store operation data of the CPU, and exchange data with external storage such as hard disk,

3. Storage devices: memory can't save the data for a long time (ROM), information is lost when the power outage, programs and data will be stored in a storage device (such as hard disk), when programs and data need to use, then loaded into memory, attention, memory read and write speed is much faster than the storage device,
Storage devices are: disk drives, cd-rom drives (CD, DVD) USB flash drives (U disk),
1.2.2. Software
Software description: organization in sequence of computer data and instruction set,
Software + command +=data document
System software
1.For example: Widows xp Linux Unix

2. The application softwareSuch as: QQ, WPS, Photoshop, Microsoft Office
Software development: making software,
The essence of the software: improve the efficiency of people to communicate with the computer, convenient and human and machine interaction,
1.3. The human-computer interaction way:
1. The graphical interface, simple and intuitive, easy to operate, good user experience,
2. The DOS command interaction style: need to have a console, enter the specific instructions, let the computer to do some operation, more troublesome, need to record some commands, and can only do some is a single function,
Console open steps: - start? All program -- -- -? Attachment -? Command prompt
Or start -? Simply enter CMD,
Common DOS command
1.4.Dir: lists the current directory files and folder
Md: create a directory
Rd: delete the directory
CD: enter the specified directory
cd.. : return to the higher level directory
CD \ : back to the root directory
Del: delete files
Exit: launch a DOS command line
CLS: inform the computer will be the current command to empty
Echo "hello Java & gt;" A.t xt write text to the specified file
Type a.t xt display file contents command
Wildcard, can match any name,
Ctrl + up and down arrow keys: can find out the last command,
2. The introduction of Java
Language origins
Java是SUN ( Stanford University Network 斯坦福大学网络公司 ) 1995年推出的一门高级编程语言, Java名称的来源 Java最初被命名为Oak,目标在于家用电器等小型系统的编程语言,随着市场的变化,SUN着眼于网络应用的开发,Java的名字的来源:Java是印度尼西亚爪哇岛的英文名称,因盛产咖啡而闻名, 1995年5月23日,JAVA语言诞生 1996年,1997分别推出JDK1.0,JDK1.1版 1999年,JAVA被分成J2SE,J2EE,J2ME 2000年,JDK1.4发布 2004年9月30日18:00PM,J2SE1.5发布,成为Java语言发展史上的又一里程碑,为了表示该版本的重要性,J2SE1.5更名为Java SE 5.0 2005年,JAVA版本正式更名为JAVAEE,JAVASE, JAVAME 2006年12月,SUN公司发布JRE6.0    2009年04月20日,Oracle以74亿美元收购Sun,取得java的版权, 2010年9月,JDK7.0已经发布,增加了简单闭包功能,    2011年7月,甲骨文公司发布java7的正式版,


In August 2013, a computer language used list

Question: learning Java requires research?
2.2 Java language important features of cross-platform
2.2.1 cross-platform
What is a cross-platform (computer system), cross-platform concept is an important concept in software development, which is not dependent on the operating system, also don't trust hardware environment, an operating system, the development of application on another operating system can still run,
2.2.2. Java cross-platform
"Write once run anywhere"
Java cross-platform is relative to the case of other programming languages, using Java language applications can run on different system platforms, the general high-level language if you want to run on different platforms, at least needs to be compiled into different target code, compiled in the Windows of the c language program, can't be run under Linux, under Linux compiled c language program, of course, also can not run on Windows, while the Java language runtime on different platforms do not need to recompile,
Principle: Java cross-platform Java cross-platform is done by the Java virtual machine (JVM),
2.2.3. Java virtual machine (JVM)
Java Virtual Machine, a software simulation computer, Java source program to imagine our C source program, compiled Java source program to generate the bytecode (. Class) is equivalent to the C source program compiled binary executable file, the JVM Virtual Machine is equivalent to the computer system (operating system and hardware environment), the Java interpreter is equivalent to the CPU,
.exe files directly under the Windows operating system running, is running on the CPU is machine code (.exe files)
.class bytecode file under the virtual machine is running on the JVM, the Java interpreter is running on the Java bytecode,
Java interpreter is equivalent to run Java bytecode "CPU", but the "CPU" does not come in through the hardware implementation, but with the software implementation of the Java interpreter is actually a specific platform application, as long as the interpreter program implements specific platform, Java bytecode can run on the platform by the interpreter program, this is the root of the Java cross-platform, at present, not under the platform of all have the corresponding Java interpreter program, which is the Java is not in all platform can run, it can only be implemented for running the Java interpreter program platform,




2.3 Java platform for the three major
JavaSE
Java SE (Java Platform, Standard Edition), known as the J2SE Java SE before, it allows the development and deployment in the desktop, server, embedded and real-time environment of Java applications, Java SE contains support Java Web service development, and for the Java Platform, Enterprise Edition (Java EE) provides the basis,
Example: similar to QQ, demining, fly autumn, meant that desktop applications,
Java EE
Java EE (Java Platform, Enterprise Edition), the version, formerly known as J2EE Enterprise version to help develop and deploy a portable, robust, scalable and secure server-side Java applications, Java EE is built on the basis of Java SE, it provides a Web service, component model, management and communications API, which can be used to realize Enterprise service oriented architecture (service - oriented architecture, SOA) and Web 2.0 applications,
Java ME
Java ME (Java Platform, Micro Edition), this version is called before the J2ME, also called K - Java, Java ME for mobile devices and embedded devices (such as mobile phone, PDA, set-top boxes and printer) applications running on providing a robust and flexible environment, Java ME including flexible user interface, a robust security model, many built-in network protocol and can be downloaded dynamic networking and extensive support offline applications, applications based on Java ME write it only once and can be used in many devices, and can make use of the machine function of each device,
3. The environmental structures,
3.1 JDK introduction:
JDK (Java Development Kit) is a product of Sun Microsystems for Java developers, since introduced Java JDK has become the most widely used Java SDK, JDK is the core of the Java, including the Java runtime environment, Java tools based class libraries, and Java JDK is the first step to learn Java, starting from Sun JDK5.0, provides a very practical functions such as generic, its version also constantly updated, efficiency obtained the very big enhancement,
3.2 JDK installation
http://www.oracle.com/index.html, http://www.java.sun.com




3.3 the JDK directory
Bin: deposit is a commonly used tool to develop Java programs,
Demo: the example program source code,
Include: contains c language program, support local interfaces of the c and Java virtual machine debugger local interfaces,
Sample: mainly includes some typical small example JNLP example
Jre: mainly contains Java programs to run classes
Bin: when used to run the executable file
Lib: class library
To install the JDK matters need to be aware of:
1. Don't install path contains Chinese,
2. Do not include Spaces in the installation path,
3.4 the JRE Jane
JRE Java Runtime Environment Java Runtime Environment, including the Java Virtual Machine (Java Virtual Machine (JVM) and Java program required core class libraries, etc., if you want to run a development good Java program, you just need to install the JRE in the computer,

3.5 configure the path environment variable
1. In the DOS window knock javac

We knock at random a directory javac or Java command, DOS window shows this is not the internal command, and then when we knock on notepad on command, opened a notepad procedures, but did not exist in the current directory on the notepad. Exe executable file, then why can start?
Error reason: the original write a command on the DOS window, if can't find the specified in the current directory executable file, then it will be according to the path environment variable to hold the path to search whether there is the executable file, if there is start the program, or there will be no this command,
2. Solution:
1, bin directory into the JDK installation directory,
2, knock on the DOS command javac, (if the above figure information configuration success)

3. Why do you want to configure the path environment variable
Because under JDK bin folder there are a lot of us to use in the development of tools, such as Java. Exe, javac. Exe, jar. The ex, etc., so when we use, want to use these under computer anywhere Java development tools, then we will need to have the tool path to the location of the configuration to the system environment variable, when we use the system can help and we find these commands,
4. How to configure the path environment variable
We will be under JDK bin path for copy
-- -- -- -- -- in our computer? Properties -- -- -- -- -? nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related