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?

查看:155
本文介绍了JDK / JRE / JVM / Java SDK |它们是什么意思?有时你可以用JRE开发,有时你需要JDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说实话,我对这些术语(JDK / JRE / Java SDK)感到很困惑。我不知道每个人做什么。



当我第一次在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屋!

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