简体   繁体   中英

Setting up Java and Eclipse IDE - Redundant installations

Am I doing the same thing by installing the Java EE package from the official Java website and installing the Eclipse IDE for Java EE developers ? Do they have the same components?

No they do not have same components!

Difference between Eclipse for Java EE and Classic version of Eclipse with Java EE libraries is that you have editors for various things like HTML to JSP/JSF. You also have additional functionality like servers to configure. But irrespective of Eclipse you are using you need the java EE library to run your apps. So you either install Java EE SDK(and then configure Eclipse to use this SDK) or use a dependency manager.

When you download Eclipse IDE for Java EE you get tools for developing EE applications. For eg. XML editors and tools, servers etc. Before you start running your EE applications you have to specify installation path for your server like Tomcat or Glassfish which is also a part oh your Java EE SDK installation. These servers containers provide the runtime libraries needed for your dynamic web projects to run. Yes you still need the libraries at compile time which is why most programmers use some dependency manager like Apache Ivy or Maven . Also Java EE libraries like javax.annotation you have to provide it in dependency manager.

So if I just installed Java SE first and then Eclipse for Java EE, wouldn't I have the Java EE libraries?

No! So when you install Java SE you will get standard java libraries.When you install Eclipse(and configure it to use Java SE SDK you just installed) for Java EE(including server) you will have all the tools required to configure and run web application. But if you want EE functionality you need to add those corresponding libraries - either install SDK or use dependency manager. So both - Eclipse for Java EE and Java EE SDK are really two different things and you need both to run Java EE applications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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