20165203 2017-2018-2 "Java program design" the first week to summarize the learning contents of teaching materials (a) the status of Java
Java is an object-oriented programming, and involves the network, multithreading and other important basic knowledge, is a very good object-oriented language.
(ii) Features of Java
Simple Object-oriented platform independent multithreading dynamic
(c) Three major platforms of Java
Java SE Java EE java ME
Four Four components of Java SE
Jvm:java virtual machines, included in the JRE
Jre:java execution Environment, running Java program required
JDK: Includes jrk and tools needed in the development process, such as Javac, Java and other tool programs, the development of Java programs required
Java language
Therefore, if you are only executing Java programs, you can not download the JDK
(v) Installation of JDK on Jdk1.windows
According to the method in the textbook, first login website ... http://www.oracle.com/technetwork/java/javase/downloads/index.html, as shown after successful installation
, note that the path to the JDK and JRE cannot be the same because the JDK itself already contains the JRE.
2. System environment variable settings
Set system variable java_home, variable value set to jdk1.8 path
3. System environment settings for path
Edit path, add jdk1.8 paths
and add%java_home%\bin
(vi) Development of Java Programs Step 1. Write the source file in Notepad:
- The source file extension must be. java
- The name of the source file must be the name of a class
- If there is a public class in the source file, the name of the source file must be the name of the class
- Source files have up to 1 public classes
2. Compiling the source file
Javac file name. java
3. Running
- Run main class (with void Man)
- Java < main class name;, without extension
4. Anti-compilation
Anti-compile class file
Problems encountered in learning and their solutions
Q: When I set the environment variables, when I enter javac on the command line, I get an error indicating that Javac is not an external command, before the environment variables are set according to the textbook tips, so it's a headache.
A: With the help of classmates, I found that I did not add jdk1.8 address in the environment variable path. ,
Problems with Git settings
Q: Enter git Remote Add Origin http://git.oschina.net/username/project name. Git with spelling errors
A: Enter Git pull Origin master, exit the edit page, and then reenter GIT push Origin master.
Q: Create a file in the virtual machine and try to view it with a CD, but it doesn't help
A:CD is used to switch to the file directory to be reached, LS is to view the file
Q: I set the run.sh script file, display failed, do not know what is the reason?
A: After self-check the tutorial found that did not join
chmod +x run.sh
The Set permissions feature. After the setting is successful as shown
Q: How do I move the cursor in normal mode when I enter the code using the VIM editor?
A: After consulting Baidu, found to use
graph LRH-->左
graph LRJ-->下
graph LRK-->上
graph LRL-->右
How to move the cursor under--vim
Q: When setting up git, there are some unsuccessful setup issues.
A: Summarize the problem solution as follows:
- You may have the wrong code.
- Permissions not set
- Git commands are wrong and should be corrected in time
With the help of my classmates, I succeeded in uploading the code,
Problems in code debugging and the process of solving them
There are some letters and case of the wrong problem, and has been properly resolved, the code is relatively simple, there is no big problem.
Code Hosting
Last week's summary of the wrong quiz
If you just want to run a Java program, which installation is the download program?
A.JDK B.jre C.javadoc D.glassfish
Answer: B
Parsing: Compiling the program JDK
Download the program JRE
Other
Study this week, the first week to learn a lot of ways to submit homework 0 Basic Java, give me the feeling is not understand the concept must not worry, do not blindly rely on others, first try to solve their own problems (Baidu or other information can be consulted), found that they cannot solve, and others to explore, and to have some understanding. In the past week, really want to thank the students who helped me, learn Java road I never lonely, because you, have everyone's help, we work together, will be able to overcome the difficulties of Java, to achieve the desired results.
20165203 2017-2018-2 "Java programming" the first week of study summary