JDK / JRE / JVM / Java SDK |它们是什么意思?有时你可以用JRE开发,有时你需要JDK? [英] JDK/JRE/JVM/Java SDK | What do they all mean? Sometimes you can develop with JRE and sometimes you need JDK?
问题描述
当我第一次在Eclipse中开始简单的java示例时,我确信我只有JRE,我相信是默认java安装程序常规用户可以在他们的系统上运行java程序/小程序。
然而,现在在上课我们使用的是Google Appengine,而这需要JDK我猜这是与Java SDK相同的。在浪费了一些时间后,发现安装JDK意味着我还必须将java / bin添加到环境变量中,以使javac -version在命令提示符下工作,我发现只有JDK有javac ...
我早期的java程序是如何工作的,没有安装JDK,因此没有javac?真正的主要问题... JRE和JDK有什么区别,什么时候使用每一个?
谢谢:)
Eclipse有自己的内置编译器(称为 ecj
),这可能是原因你可以摆脱没有安装JDK使用它。它不使用 javac
。
Google App Engine使用 javac
与JDK一起提供。
To tell the truth, I am quite confused on all these terms (JDK/JRE/Java SDK). I am not sure what each one does.
When I first started doing simple java examples in eclipse, I am pretty sure I only had the JRE, which I believed was the default java installer regular users use to be able to run java programs/applets on their system.
However, now in class we are using Google Appengine, and this requires the JDK which I am guessing is the same as Java SDK. After wasting some time finding out that installing the JDK meant I also had to add java/bin to the environment variables to get javac -version to work in the command prompt I find that only the JDK has javac...
How were my early java programs working without having installed the JDK and therefore not having javac? And really the main question... What is the difference between the JRE and JDK, and when do you use each one?
Thank you :)
Eclipse has its own built-in compiler (called ecj
), which is probably the reason you could get away with not having the JDK installed to use it. It does not use javac
.
Google App Engine uses the javac
that comes with the JDK.
这篇关于JDK / JRE / JVM / Java SDK |它们是什么意思?有时你可以用JRE开发,有时你需要JDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!