很多东西官网就有,没必要从别人的网盘上下载,官方下载的才是最安全放心的。
***默认进入页面为最新版本,现在是Java19和Java17。目前企业使用较多为Java7和Java8***
https://www.oracle.com
–>点击Products
–> 点击Hardware and Software类别下的Java
https://www.oracle.com/java
–>ctrl+f搜索【Java products and technologies】
–>单击Java SE–>单击Download Java now
https://www.oracle.com/java/technologies/downloads/
–>选择标签【Java archive】
https://www.oracle.com/java/technologies/downloads/archive/
–>ctrl+F搜索【Previous Java releases】
–>Java SE downloads下选择自己需要的版本
注意有Java SE 8 (8u211 and later)和Java SE 8 (8u202 and earlier)这两个版本,是JDK授权方式的分水岭:
Java SE 8 (8u202 and earlier):最后一个采用BCL协议(协议规定你可以使用JDK,但是不能进行修改。私用和商用都可以,但是JDK中的某些商业特性,是需要付费才可以使用的)的版本,通俗讲就是最后一个免费商用版本。
https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
WARNING: These older versions of the JRE and JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended for use in production.
These Java SE 8 update releases are provided under the Binary Code License (“BCL”).
Java SE 8u211 and later updates are available, under the Java SE OTN License.
For production use Oracle recommends downloading the latest JDK and JRE versions and allowing auto-update.
Only developers and Enterprise administrators should download these releases.
Downloading these releases requires an oracle.com account. If you don’t have an oracle.com account you can use the links on the top of this page to learn more about it and register for one for free.
For current Java releases, please consult the Oracle Software Download page.
Java SE 8 (8u211 and later):目前新发布的JDK用的都是这个协议,可以私用,商用需要付费。
https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html
WARNING: These older versions of the JRE and JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended for use in production.
These Java SE 8 update releases are provided under the Java SE OTN License.
Java SE 8u202 and older updates are available, under the Binary Code License (“BCL”).
For production use Oracle recommends downloading the latest JDK and JRE versions and allowing auto-update.
Only developers and Enterprise administrators should download these releases.
Downloading these releases requires an oracle.com account. If you don’t have an oracle.com account you can use the links on the top of this page to learn more about it and register for one for free.
For current Java releases, please consult the Oracle Software Download page.
https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
–>搜索Java SE Development Kit 8u202
–>根据自己平台选择相应的包下载
Java官方文档很有必要看下,因为很多职业教育的老师,还有技术大佬,他们都有个习惯就是经常阅读官方文档。
https://www.oracle.com/java/technologies/javase-jdk8-doc-downloads.html
>Java Doc网址:
https://www.oracle.com/
Resources
Help Center
Document
https://docs.oracle.com/en/java/index.html
Java SE文档提供3种文档类型,分别为以下类别:
咱们先看最基础的技术文档
Java文档默认提供最新版本,我们根据自己需求选择需要的版本
https://docs.oracle.com/en/java/javase/19/
https://docs.oracle.com/javase/8/
https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html
https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_system_requirements.html#BABHGIJF
对Windows需要安装JDK8的64位操作系统在CPU,Memory,Disk提出了要求
Processor Requirements
Both the JDK and JRE require at minimum a Pentium 2 266 MHz processor.
Disk Space Requirements
The JDK features available for 64-bit platforms are the same as those for Windows 32-bit operating systems.
The disk requirement for development tools for 64-bit platforms is 181 MB. The disk space requirements for source code and the public JRE are the same as those for Windows 32-bit operating systems, except for the JavaFX SDK (68 MB) and the JavaFX runtime (32 MB).
Memory Requirements
On Windows 64-bit operating systems, in 32- or 64-bit mode, the Java runtime requires a minimum of 128MB of memory.
https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html#CHDEBCCJ
环境变量的配置在Java Doc也有,一般人懒得找就是了,网址如下
https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
https://docs.oracle.com/javase/tutorial/
https://docs.oracle.com/javase/tutorial/essential/index.html
https://docs.oracle.com/javase/tutorial/essential/environment/index.html
https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
大家都知道用Windows下CMD调出控制台,然后输入java -version,都知道可以如果显示出具体的版本号,就说明成功了。
但是第一个给你讲的大佬,是怎么知道这个命令的?其实还是我开头说的,都在官方文档中。
路径为:Java Platform Standard Edition 8 Documentation
–>Java Platform, Standard Edition 8 Names and Versions中的Version String,如下图所示
下图是我环境执行的结果
Java SE 工具参考中有关于JDK目录的介绍。
https://docs.oracle.com/javase/8/
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/index.html
具体目录明细如下:
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jdkfiles.html#sthref16
jdk1.8.0
bin
java*
javac*
javap*
javah*
javadoc*
lib
tools.jar
dt.jar
jre
bin
java*
lib
applet
ext
jfxrt.jar
localdata.jar
fonts
security
sparc
server
client
rt.jar
charsets.jar
JDK安装后的根目录. 包含 版权声明, license, README文件. 也包含src.zip, Java平台归档的源代码.
JDK中包含的所有开发工具的可执行程序。PATH环境变量应该包含此目录的一个条目。
开发工具使用的文件。包含tools.jar,其中包含支持JDK中的工具和实用程序的非核心类。还包括dt.jar,这是BeanInfo文件的DesignTime归档文件,它告诉交互开发环境(ide)如何显示Java组件,以及如何让开发人员为应用程序定制它们。
JDK开发工具使用的Java运行环境(JRE)的根目录。运行时环境是Java平台的一个实现。
Java平台使用的工具和库的可执行文件。可执行文件与/jdk1.8.0/bin中的文件相同。java启动器工具充当应用程序启动器。这个目录不需要在PATH环境变量中。
JRE使用的代码库、属性设置和资源文件。例如,rt.jar包含引导类,引导类是组成Java平台核心API的运行时类,而charsets.jar包含字符转换类。除了ext子目录之外,还有几个额外的资源子目录没有在这里描述。
Java平台扩展的默认安装目录。例如,这是安装JavaHelp JAR文件时的位置。该目录包括jfxrt.jar文件,该文件包含JavaFX运行时库和localedata.jar文件,该文件包含java. jar的语言环境数据。文本和java。util包。参见扩展机制
包含用于安全管理的文件。其中包括安全策略java。策略和安全属性java。安全文件。
包含applet支持类的JAR文件可以放在lib/applet/目录中。这允许applet类装入器从本地文件系统预装入applet类,从而减少了大型applet的启动时间,并提供了与从Internet下载相同的保护。
平台使用的字体文件。
本节描述Java源代码、C头文件和其他附加目录和文件的目录结构。
jdk1.8.0
include
man
src.zip
/jdk1.8.0/src.zip
包含Java平台源代码的存档。
/jdk1.8.0/include
支持本地代码编程的c语言头文件,包括:
Java Native Interface
Java Virtual Machine Tool Interface (JVM TI)
Java Access Bridge API
https://docs.oracle.com/javase/8/
https://docs.oracle.com/javase/tutorial/tutorialLearningPaths.html
https://docs.oracle.com/javase/tutorial/getStarted/index.html
教程开始包含
- The Java Technology Phenomenon 提供Java技术的总体概述。它讨论了Java编程语言和平台,提供了该技术可以做什么以及如何使您的生活更容易的概览。
- The “Hello World!” Application 这种亲力亲为的方法描述了为了创建一个简单的“Hello World!”应用程序,需要下载什么、安装什么以及输入什么。它为NetBeans™集成开发环境(NetBeans IDE)、Microsoft Windows、Solaris™操作系统(Solaris OS)、Linux和Mac用户提供了单独的说明。
- A Closer Look at “Hello World!” 讨论“Hello World!”应用程序,详细描述每一段代码。它涵盖了源代码注释、HelloWorldApp类定义块和主方法。
- Common Problems (and Their Solutions)如果您在编译或运行此路径中的程序时遇到困难,可以到这里
public class Hello{
public static void main(String[] args){
System.out.print("Hello World!");
}
}
javac Hello.java
java Hello
PS E:\code> javac Hello.java
PS E:\code> java Hello
Hello World!
PS E:\code>
https://notepad-plus.en.softonic.com/
傻瓜化的下一步,next没啥好说的。
新建文件 Ctrl+N
打开文件 Ctrl+O
保存文件 Ctrl+S
另存为 Ctrl+Alt+S
全部保存 Ctrl+Shift+S
关闭当前文件 Ctrl+W
打印文件 Ctrl+P
退出 Alt+F4
撤销 Ctrl+Z
恢复 Ctrl+Y
剪切 Ctrl+X
复制 Ctrl+C
删除 Del
全选 Ctrl+A
列编辑 Alt+C
缩进 Tab
删除缩进 Shift+Tab
转为大写 Ctrl+Shift+U
转为小写 Ctrl+U
复制当前行 Ctrl+D
删除当前行 Ctrl+L
分割行 Ctrl+I
合并行 Ctrl+J
上移当前行 Ctrl+Shift+Up
下移当前行 Ctrl+Shift+Down
添加/删除单行注释 Ctrl+Q
设置行注释 Ctrl+K
取消行注释 Ctrl+Shift+K
区块注释 Ctrl+Shift+Q
函数自动完成 Ctrl+Space
查找 Ctrl+F
在文件中搜索 Ctrl+Shift+F
查找下一个 F3
查找上一个 Shift+F3
选定并找下一个 Ctrl+F3
行定位 Ctrl+G
定位匹配括号 Ctrl+B
设置/取消书签 Ctrl+F2
下一书签 F2
上一书签 Shift+F2
全屏 F11
便签模式 F12
折叠所有层次 Alt+0
展开所有层次 Alt+Shift+0
折叠当前层次 Ctrl+Alt+F
展开当前层次 Ctrl+Alt+Shift+F
隐藏行 Alt+H
从视图激活 F8
打开的文件比较 Alt+D
关闭文件比较 Ctrl+Alt+D
跟上次保存的文件比较 Alt+S
跟SVN的文件比较 Alt+B
上一个差异地方 Ctrl+Page UP
下一个差异地方 Ctrl+Page Down
第一个差异地方 Ctrl+Shift+Page Up
最后一个差异地方 Ctrl+Shift+Page Down查找 Ctrl+F
在文件中搜索 Ctrl+Shift+F
查找下一个 F3
查找上一个 Shift+F3
选定并找下一个 Ctrl+F3
行定位 Ctrl+G
定位匹配括号 Ctrl+B
设置/取消书签 Ctrl+F2
下一书签 F2
上一书签 Shift+F2
待补充