为什么Eclipse不需要我配置JDK? [英] Why doesn't Eclipse need me to configure a JDK?

查看:673
本文介绍了为什么Eclipse不需要我配置JDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将Eclipse下载到Windows 7机器上。该机器已经有一个JRE,但我注意到它没有JDK。我害怕我会下载JDK,然后钩到Eclipse。我是(pleasanly)惊讶,当我能够编写,编译和运行在Eclipse的开箱即用。但是,现在我很困惑。从我对Java的了解,Eclipse应该需要一个JDK来编译代码和一个JRE来执行它。



我能想到的最好的是...


  1. Eclipse与JDK打包(如果是这样,我在我的计算机上找不到JDK)

  2. 我离开了离开的领域,不明白JDKs和我以为我做了。

一个好奇心的问题,为什么我能够编译java没有JDK?

解决方案

Eclipse有一个内部编译器一段时间。几年前,它需要一个JDK,但现在一个JRE就足够了。



但是如果你想在Java源代码中浏览或调试,JDK更好。 / p>

I recently downloaded Eclipse onto a Windows 7 machine. The machine already had a JRE but I noticed it didn't have a JDK. I was afraid I would have to download the JDK and then hook Eclipse up to it. I was (pleasanly) surprised when I was able to code, compile and run in Eclipse right out of the box. However, now I'm confused. From what I know about Java, Eclipse should need a JDK to compile code and a JRE to execute it.

The best I can think of is...

  1. Eclipse is packaged with a JDK (if this is true, I can't find the JDK on my computer)
  2. I'm way out in left field and don't understand JDKs as well as I thought I did.

Admittedly more of a curiosity question, why am I able to compile java without a JDK?

解决方案

Eclipse has an internal compiler for some time now. Several years ago it needed a JDK but for now a JRE will suffice.

However if you want to browse or debug in the Java source code, a JDK is better.

这篇关于为什么Eclipse不需要我配置JDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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