How to install Java EE perspective in Eclipse?

Asked

Viewed 8,798 times

1

I want to start studying Java for the web (Servlets, JSP, EJB, Servlets and JSP). I have already installed Tomcat, JRE, JDK 7 and Eclipse Kepler Standard.

How do I set up Eclipse to add JEE perspective through plugins? I need to add the perspective of Enterprise Edition because I don’t want to have more than one IDE installed on my computer.

Beyond the perspective of the JEE in Eclipse, what differences between SE and EE editions require more installations for me to start development? For example: Do JRE and JDK remain the same? Each issue (SE and EE) has a different JRE and JDK?

  • 2

    Sid if any of the answers solved your question, please consider marking it as correct. Hug!

2 answers

5

There is not only one IDE

First, there are other good IDE options for Java development, the best known being Netbeans and Intellij. But don’t be afraid of the Eclipse.

Suitable version of Eclipse for Java EE

To develop in Java EE, my suggestion is to go to Eclipse downloads page and download the version Eclipse IDE for Java EE Developers. This is just a shortcut to get Eclipse Standard + JDT (Java Development tools).

The Eclipse works with multiple perspectives

Although you recommended "Eclipse Java EE", this does not mean that this version only allows you to create Java EE applications. Eclipse is an IDE that works with plugins.

A single installation can contain several of them and you can easily switch between different "environments" of development through the so-called "perspectives".

Accessing the "Javaee" perspective, the Eclipse will show the panels commonly used for Javaee development.

On the other hand, you could also install the plugin Pydev and switch to their perspective to develop in Python.

Anyway, it is not necessary to have more than one installation. Just do not overload Eclipse with many plugins as it may start to get slow.

Java SE and Java EE

In practice, there is no difference between developing for Java EE or Java SE. You will always create Java classes.

What changes are the Apis used, that is, interfaces you use to implement a program or auxiliary classes.

The biggest difference is that Java EE usually requires additional dependencies that do not come with the JDK, but are available through an Application Server such as Jboss or Glassfish.

Application Servers

Note that Tomcat is not a full JEE server, as it does not natively provide Apis like JTA, EJB, JPA, JSF, etc.

Because of this, he is known as a Web Container, that is, a Web Application Server that only provides web-specific Apis like Jsps and Servlets.

However, you can manually add third-party libraries to enable JEE Apis in Tomcat.

Additional help

If you have questions about the installation and basic use of Eclipse Kepler, take a look at my article:

Installing, Configuring and Using Eclipse Kepler

  • 1

    Thanks. On Ides, I think I’ll keep the Eclipse anyway. I tested this Intellij and found it heavy, little flexible and too weird: It takes longer to boot than Eclipse, it’s heavier, and I didn’t like his design that focuses more on being cute than showing the ready-made tools. So, I think I’m going to use Eclipse for Java EE for everything and import my Standard projects into it. What about Tomcat: So, since I’m a beginner, would it be advisable for me to use Glassfish because it’s already complete? Because for this Tomcat I would need to set up some things and stuff.

  • @It depends on what you do. If you’re just working with Jsps and simple access to the bank, stick with Tomcat for now because it’s simpler. On the other hand, if you want to develop professionally, I would go to Glassfish or Jboss.

  • Understood. In fact, in order not to create another question and pollute the homepage, here is another question: Are these Servlet Containers in general Web Servers in Java? I mean, if they are Java counterparts for software like IIS and Apache HTTP Server. Which, from what I studied, can be called Web Servers.

  • @Sid By my understanding it is not exactly that. They can be analogs if comparing to Apache + PHP or ISS + ASP. Servlet Containers mean they implement the Servlets API, but they’re still very powerful if you use the right libraries. Spring Framework is the best example. With it, a Tomcat can be as powerful as a Full Javaee for certain contexts.

  • @utluiz, how does Tomcat work? I mean, if it does not provide Apis, where does the application take them from?

1

Dude, I don’t understand your problem with Eclipse EE. You’ll be able to work normally (as if you were using the Standard version) anytime. There is no problem...

Since it is your first language, I recommend studying the OO paradigm and training the basic concepts of language. Only after that I think it is worth studying JSP, Servlets... Until then you can use the same standard version...

In both cases, I recommend these booklets: Java and Object Orientation: http://www.caelum.com.br/apostila-java-orientacao-objetos/

Java for Web Development: http://www.caelum.com.br/apostila-java-web/

Take it easy and you can’t learn everything in one shot! rs

Good luck! D

  • 1

    But, man, I’ve studied the whole object orientation paradigm, I already know all the rules of Java syntax and I already know more than 10 Desing Patterns :D. I’ve been studying Java for just over a year, on my own. I already know the standard API fairly well and am interested in areas to apply Java, such as the Web.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.