与java.exe完全混淆 [英] Totally Confused with java.exe

查看:152
本文介绍了与java.exe完全混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JDK是JRE的超集。 JDK具有必要的工具,如javac java.exe调试器等+ JRE。
但是JRE有一个特殊的JVM实现。

The JDK is the superset of JRE. JDK has the necessary tools like javac java.exe debugger etc + JRE. But JRE has a particular implementation of JVM.

我的假设是java.exe或java应用程序启动器是解释器(如果我错了请纠正我)。
此外,JVM也做了解释。

My assumption is java.exe or the java application launcher is the interpreter (please correct me if I'm wrong). Also, JVM does the interpretation as well.

最后是JVM的解释器部分还是JDK工具的一部分?请解释。

Finally is the interpreter part of JVM or part of JDK tools? Please explain.

推荐答案

java.exe 既不是JVM也不是翻译。它是一个启动器 - 一个通常用C编写的小程序,它执行以下操作:

java.exe is neither a JVM nor an interpreter. It is a launcher - a small program typically written in C which does the following:


  1. 找到已安装的JRE

  2. 加载JVM动态库( jvm.dll

  3. 创建新的Java虚拟机使用 Invocation API

  4. 使用 main()方法/guides/jni/spec/jniTOC.html\">JNI

  1. Locates an installed JRE
  2. Loads JVM dynamic library (jvm.dll)
  3. Creates a new Java Virtual Machine using the Invocation API
  4. Finds the main class and calls the main() method using JNI

JRE大致由


  1. JVM - jvm.dll

  2. 类库 - rt.jar

  3. 本地库 - 类库和OS平台之间的层,例如 java.dll net.dll nio.dll awt.dll 等。

  4. 资源 - 字体,属性,字符串等。

  1. JVM - jvm.dll
  2. Class Library - rt.jar
  3. Native libraries - the layer between the class library and the OS platform, e.g. java.dll, net.dll, nio.dll, awt.dll etc.
  4. Resources - fonts, properties, strings etc.

现在,字节码解释器,字节码验证程序,类加载器,JIT编译器,垃圾收集器和许多其他很酷的东西 - 都是Java虚拟机的所有部分。

Now, the Bytecode Interpreter, the Bytecode Verifier, the Class Loader, the JIT compiler, the Garbage Collector and many other cool stuff - are all parts of the Java Virtual Machine.

这篇关于与java.exe完全混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆