惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
博客园 - 三生石上(FineUI控件)
aimingoo的专栏
aimingoo的专栏
人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research
MongoDB | Blog
MongoDB | Blog
Microsoft Azure Blog
Microsoft Azure Blog
G
Google Developers Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
云风的 BLOG
云风的 BLOG
Jina AI
Jina AI
S
Schneier on Security
T
Threatpost
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Spread Privacy
Spread Privacy
The Register - Security
The Register - Security
Google DeepMind News
Google DeepMind News
L
LINUX DO - 热门话题
T
Tenable Blog
M
MIT News - Artificial intelligence
Vercel News
Vercel News
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
C
Cyber Attacks, Cyber Crime and Cyber Security
L
Lohrmann on Cybersecurity
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Hacker News
The Hacker News
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
P
Palo Alto Networks Blog
A
About on SuperTechFans
V
Visual Studio Blog
T
The Exploit Database - CXSecurity.com
Scott Helme
Scott Helme
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
MyScale Blog
MyScale Blog
月光博客
月光博客
P
Privacy & Cybersecurity Law Blog
H
Help Net Security
腾讯CDC
T
Tailwind CSS Blog
博客园_首页
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
博客园 - 【当耐特】

博客园 - ted

Docker commands 低代码 产品的核心价值 如何判断需求的优先级 以组件为基础,基于功能扩展的前端架构 演进中的架构 康威定理 技术解耦和团队解耦 SSL的那些事——三 SSL的那些事_二 Xamarin 技术解析 Javascript Promises 介绍 Javascript的模块化编程 UI 设计概念介绍 Head First iOS Programming 一个Web页面的问题分析 QCon杭州2012技术开发大会感受 Ajax请求与浏览器缓存 你了解Java中String的substring函数吗?
Java中的一些基础概念
ted · 2012-08-17 · via 博客园 - ted

学习了Java没多久,有一些基础概念有点犯迷惑。今天偶遇好文,摘录在此:

JDK (Java Development Kit)

Java Developer Kit contains tools needed to develop the Java programs, and JRE to run the programs. The tools include compiler (javac.exe), Java application launcher (java.exe), Appletviewer, etc…

Compiler converts java code into byte code. Java application launcher opens a JRE, loads the class, and invokes its main method.

You need JDK, if at all you want to write your own programs, and to compile the m. For running java programs, JRE is sufficient.

JRE is targeted for execution of Java files

i.e. JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime libraries.

JDK is mainly targeted for java development. I.e. You can create a Java file (with the help of Java packages), compile a Java file and run a java file

JRE (Java Runtime Environment)

Java Runtime Environment contains JVM, class libraries, and other supporting files. It does not contain any development tools such as compiler, debugger, etc. Actually JVM runs the program, and it uses the class libraries, and other supporting files provided in JRE. If you want to run any java program, you need to have JRE installed in the system

The Java Virtual Machine provides a platform-independent way of executing code; programmers can concentrate on writing software, without having to be concerned with how or where it will run.

If u just want to run applets (ex: Online Yahoo games or puzzles), JRE needs to be installed on the machine.

JVM (Java Virtual Machine)

As we all aware when we compile a Java file, output is not an 'exe' but it's a '.class' file. '.class' file consists of Java byte codes which are understandable by JVM. Java Virtual Machine interprets the byte code into the machine code depending upon the underlying operating system and hardware combination. It is responsible for all the things like garbage collection, array bounds checking, etc… JVM is platform dependent.

The JVM is called "virtual" because it provides a machine interface that does not depend on the underlying operating system and machine hardware architecture. This independence from hardware and operating system is a cornerstone of the write-once run-anywhere value of Java programs.

There are different JVM implementations are there. These may differ in things like performance, reliability, speed, etc. These implementations will differ in those areas where Java specification doesn’t mention how to implement the features, like how the garbage collection process works is JVM dependent, Java spec doesn’t define any specific way to do this.

Classpath

Classpath is nothing but setting up the environment for Java. Java will use to find compiled classes (i.e. .class files).

Path

PATH is nothing but setting up an environment for operating system. Operating System will look in this PATH for executables.