简体   繁体   English

如果已经安装了JDK和JRE,是否需要为Eclipse Neon安装Java插件?

[英]Do I need to install Java plugins for Eclipse Neon if I already have JDK and JRE installed?

I've been using Eclipse Neon (4.6.0) which only supports C/C++ by default. 我一直在使用默认情况下仅支持C / C ++的Eclipse Neon(4.6.0) Now that I need to program in Java, I want to integrate Java to the IDE I'm using. 现在,我需要用Java进行编程,我想将Java集成到我正在使用的IDE中。 So I went to install the " Eclipse JDT Plug-in Developer Resources " Java plugin, including " Eclipse Java Development Tools ." 因此,我去安装了“ Eclipse JDT插件开发人员资源 ” Java插件,包括“ Eclipse Java开发工具”

But then, I have the JDK and JRE installed from Oracle very much prior to this day. 但是然后,我很早以前就从Oracle安装了JDK和JRE。 Now I wonder... 现在我在想...

  • Do I need to install the Eclipse Java plugins from Eclipse even if I already have the Java JDK and JRE installed in my computer? 即使我已经在计算机中安装了Java JDK和JRE,也需要从Eclipse安装Eclipse Java插件吗?
    • If yes, then there must be a difference between the Eclipse JDK and Oracle's JDK. 如果是,那么Eclipse JDK和Oracle的JDK之间必须有所区别。 What's the difference? 有什么不同?
    • If no, how can I link the JDK and JRE (if either/both is needed) to the project, such that I can finally program in Java? 如果没有,如何将JDK和JRE(如果需要/两者)链接到项目,以便最终可以用Java编程?

Clear and concise answers are very much appreciated. 简洁明了的答案非常感谢。

TL;DR : Yes, you need the JDT plugin with your JDK TL; DR :是的,您需要将JDT插件与JDK一起使用

Long answer 长答案

There is no such thing as an Eclipse JDK, (albeit the SDK used for creating plugins but that's not what you want) 没有Eclipse JDK之类的东西(尽管SDK用于创建插件,但这不是您想要的)

Eclipse needs at a minimum, the JRE to run itself. Eclipse至少需要JRE才能运行。 If you need to program in Java, you install the JDK. 如果需要使用Java编程,请安装JDK。

As for the Eclipse JDT plugin, it is needed for making Eclipse ready for Java development (necessary things like the Java perspective for example) 至于Eclipse JDT插件,则需要使Eclipse做好Java开发的准备(例如,诸如Java透视图之类的必需东西)。

Cheers! 干杯!

The JRE is the Java Runtime. JRE是Java运行时。 You need it to run Eclipse. 您需要它来运行Eclipse。

The JDK are the command-line tools to compile Java code. JDK是用于编译Java代码的命令行工具。 Eclipse has a compiler and most of those tools re-implemented in it "Java Development Tools", so you don't need a JDK to start coding. Eclipse有一个编译器,并且其中大多数工具都在其中重新实现了“ Java开发工具”,因此您不需要JDK就可以开始编码。 However, you might need some of its features later, but not worth caring about it right now. 但是,您稍后可能需要其某些功能,但现在不值得关注。

Eclipse Java Development Tools plugin provides the main tools inside the IDE to develop Java code. Eclipse Java开发工具插件提供了IDE内部用于开发Java代码的主要工具。 The Java Editor -providing completion, documentation, navigation, instant error reporting...- and Java Debugger are the 2 main ones. Java编辑器-提供完成,文档,导航,即时错误报告...-和Java调试器是2个主要工具。 If you want to be productive at writing and debugging Java code, you need to install those into your IDE. 如果要提高编写和调试Java代码的效率,则需要将它们安装到IDE中。 Otherwise, it won't be much better than a plain text editor. 否则,它不会比纯文本编辑器好得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM