JDK and JRE File Structure JAVA_HOME HotSpot优化技术
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jdkfiles.html
Java Platform, Standard Edition Tools Reference
Contents Previous Next
3 JDK and JRE File Structure
This chapter introduces the JDK directories and the files they contain. The file structure of the JRE is identical to the structure of the jre
directory in the JDK.
This chapter covers the following topics:
Demos and Samples
Demos and samples that show you how to program for the Java platform are available as a separate download at the Java SE Downloads page athttp://www.oracle.com/technetwork/java/javase/downloads/index.html
These are available as separate .tar.z
compressed packages and .tar.gz
compressed binaries. Similar to other 64-bit bundles on Oracle Solaris, the 64-bit demos and samples bundles on Oracle Solaris require that the 32-bit demos and samples bundles to also be installed.
Development Files and Directories
This section describes the most important files and directories required to develop applications for the Java platform. Some of the directories that are not required include Java source code and C header files. See Additional Files and Directories.
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
Assuming the JDK software is installed at /jdk1.8.0
, here are some of the most important directories:
- /jdk1.8.0
-
Root directory of the JDK software installation. Contains copyright, license, and README files. Also contains
src.zip
, the archive of source code for the Java platform. - /jdk1.8.0/bin
-
Executables for all the development tools contained in the JDK. The
PATH
environment variable should contain an entry for this directory. - /jdk1.8.0/lib
-
Files used by the development tools. Includes
tools.jar
, which contains non-core classes for support of the tools and utilities in the JDK. Also includesdt.jar
, theDesignTime
archive ofBeanInfo
files that tell interactive development environments (IDEs) how to display the Java components and how to let the developer customize them for an application. - /jdk1.8.0/jre
-
Root directory of the Java Runtime Environment (JRE) used by the JDK development tools. The runtime environment is an implementation of the Java platform. This is the directory referred to by the
java.home
system property. - /jdk1.8.0/jre/bin
-
Executable files for tools and libraries used by the Java platform. The executable files are identical to files in
/jdk1.8.0/bin
. The java launcher tool serves as an application launcher (and replaced the earlierjre
command that shipped with 1.1 releases of the JDK). This directory does not need to be in thePATH
environment variable. - /jdk1.8.0/jre/lib
-
Code libraries, property settings, and resource files used by the JRE. For example
rt.jar
contains the bootstrap classes, which are the run time classes that comprise the Java platform core API, andcharsets.jar
contains the character-conversion classes. Aside from theext
subdirectory, there are several additional resource subdirectories not described here. - /jdk1.8.0/jre/lib/ext
-
Default installation directory for extensions to the Java platform. This is where the
JavaHelp
JAR file goes when it is installed, for example. This directory includes thejfxrt.jar
file, which contains the JavaFX runtime libraries and thelocaledata.jar
file, which contains the locale data for thejava.text
andjava.util
packages. See The Extension Mechanism athttp://docs.oracle.com/javase/8/docs/technotes/guides/extensions/index.html
- /jdk1.8.0/jre/lib/security
-
Contains files used for security management. These include the security policy
java.policy
and security propertiesjava.security
files. - /jdk1.8.0/jre/lib/sparc
-
Contains the
.so
(shared object) files used by the Oracle Solaris release of the Java platform. - /jdk1.8.0/jre/lib/sparc/client
-
Contains the
.so
file used by the Java HotSpot VM client, which is implemented with Java HotSpot VM technology. This is the default Java Virtual Machine (JVM). - /jdk1.8.0/jre/lib/sparc/server
-
Contains the
.so
file used by the Java HotSpot VM server. - /jdk1.8.0/jre/lib/applet
-
JAR files that contain support classes for applets can be placed in the
lib/applet/
directory. This reduces startup time for large applets by allowing applet classes to be preloaded from the local file system by the applet class loader and provides the same protections as though they had been downloaded over the Internet. - /jdk1.8.0/jre/lib/fonts
-
Font files used by the platform.
Additional Files and Directories
This section describes the directory structure for Java source code, C header files, and other additional directories and files.
jdk1.8.0 db include man src.zip/jdk1.8.0/src.zip
Archive that contains the source code for the Java platform.
/jdk1.8.0/db-
Contains Java DB. See Java DB Technical Documentation at
http://docs.oracle.com/javadb/
- /jdk1.8.0/include
-
C-language header files that support native-code programming with the Java Native Interface and the Java Virtual Machine (JVM) Debugger Interface. See Java Native Interface at
http://docs.oracle.com/javase/8/docs/technotes/guides/jni/index.html
See also Java Platform Debugger Architecture (JPDA) at
http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/index.html
- /jdk1.8.0/man
-
Contains man pages for the JDK tools.
C:\Users\Administrator>scala
Welcome to Scala 2.12.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_171).
Type in expressions for evaluation. Or try :help.
scala>
JDK安装、java环境配置 - JupiterMouse - 博客园 https://www.cnblogs.com/renqiqiang/p/6822143.html
JDK JRE 区别
JDK是Java语言的软件开发工具包,主要用于移动设备、嵌入式设备上的java应用程序。JDK是整个java开发的核心,它包含了JAVA的运行环境,JAVA工具和JAVA基础的类库。
JRE(Java Runtime Environment,Java运行环境),运行JAVA程序所必须的环境的集合,包含JVM标准实现及Java核心类库.它包括Java虚拟机(jvm)、Java核心类库和支持文件。它不包含开发工具(JDK)--编译器、调试器和其它工具。如果只需要运行Java程序或Applet,下载并安装它即可。如果要自行开发 Java软件,要下载JDK(JRE和JDK的区别,没有JDK的话,无法编译Java程序,如果想只运行Java程序,要确保已安装相应的JRE)。在JDK中附带有JRE。SE(J2SE),standard edition,标准版,是我们通常用的一个版本。EE(J2EE),enterprise edition,企业版,使用这种JDK开发J2EE应用程序。ME(J2ME),micro edition,主要用于移动设备、嵌入式设备上的java应用程序
Java虚拟机(JVM)允许将代码在一个平台上编写和编译后,近乎无须进一步处理地分发到其他的平台上。尽管跨平台的问题
没有并没有消失,但是跨平台的成本相比之前极大地降低了。
随着JVM执行效率的不断提高,HotSpot优化技术被发明出来,其原理:先探测运行环境,再进行针对性的代码优化
虽然这使得JVM启动速度变慢,但是之后的运行性能则变得很适合运行服务器之类的应用。尽管最初并非为企业服务器领域设计的,JVM开始在此领域大行其道。于是,人们开始尝试简化企业服务器应用开发,Enterprise Java Beans 、Spring Application Framework 出现。
Installing the JDK Software and Setting JAVA_HOME (Using the GlassFish ESB Installation GUI) https://docs.oracle.com/cd/E19182-01/821-0917/inst_jdk_javahome_t/index.html
To Install the JDK Software and Set JAVA_HOME on a UNIX System
-
To install the JDK software, do the following:
-
Select the appropriate JDK version and click Download.
The JDK software is installed on your computer in the default location; for example, at /usr/jdk/jdk1.6.0_02. You can change this location.
-
To set JAVA_HOME, do one of the following:
-
For Korn and bash shells, run the following commands:
export JAVA_HOME=jdk-install-dir
export PATH=$JAVA_HOME/bin:$PATH
-
For the bourne shell, run the following commands:
JAVA_HOME=jdk-install-dir
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
-
For the C shell, run the following commands:
setenv JAVA_HOME jdk-install-dir
setenv PATH $JAVA_HOME/bin:$PATH
export PATH=$JAVA_HOME/bin:$PATH
-
-
Change the permissions to enable you to run the GlassFish ESB Installer by running the following command:
chmod 755 JavaCAPS.bin
To Install the JDK Software and Set JAVA_HOME on a Windows System
-
To install the JDK software, do the following:
-
Select the appropriate JDK software and click Download.
The JDK software is installed on your computer in the default location; for example, at C:\Program Files\Java\jdk1.6.0_02. You can move the JDK software to another location.
-
To set JAVA_HOME, do the following:
-
Right click My Computer and select Properties.
-
On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02.
-
【jps命令找不到】
rm -rf /usr/bin/java;ln -s /home/jdk1.8.0_171/bin/java /usr/bin/java;export PATH=$PATH:/home/jdk1.8.0_171/bin;
jps在home/jdk1.8.0_171/bin中。
Java Platform Standard Edition 8 Documentation https://docs.oracle.com/javase/8/docs/