Training notes 7.6
7.6
1. Motto
You tell my story, I leave my words, you decide how much I am worth, and I choose where I go.
2. Setting of compiled memory and running memory of java program
2.1 Compile memory settings:
file--->settings--->buildxxxx--->compiler--->内存的设置
2.2 Stack memory and heap memory settings during Java program running
-
The default stack memory is 1M
-Xss 设置栈内存的容量
-
The default value of the heap memory startup is generally 1/64 of the physical memory, and the maximum size that can be expanded is 1/4 of the physical memory.
-
application---->edit configuration--->VM Options---> -Xss1M -Xms100M -Xmx200M
-
The jar package operation can also set the memory:
java -jar -Xss1M -Xms100M -Xmx200M xxx.jar
java -cp -Xss1M -Xms100M -Xmx200M xxx.jar 全限定类名
3. Use of Maven automated build tools
3.1 Help us introduce third-party JAR package dependencies into the project, and at the same time solve the transitive dependencies of third-party jar packages
pom.xml file
GAVS坐标 Scope: compile test provided
remote warehouse
local warehouse
3.2 Maven can also help us to automatically compile, test, package, install and deploy projects
4. Java GUI programming
4.1 The top container JFrame
Layout
Azimuth layout
flow layout
absolute layout
table layout
4.2 Child containers
JPanel
JScollPanel
4.3 Components
JLabel
JButton
JTextField
JPasswordField
5. Commonly used email information and SMS information sending API use
QQ mailbox to send messages - javax.mail
Tencent Cloud's SMS API to send SMS
Alibaba Cloud's SMS API to send SMS
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>alibabacloud-dysmsapi20170525</artifactId>
<version>2.0.24</version>
</dependency>