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.
Related
I am facing issue with Maven 3.x where I am getting Guice Provision error.
With further debugging and investigation, I found the core issue that it is due to Java EE 6 not present inside my Eclipse IDE (Java EE 5 is there with one web server installed) and Guice library is looking for some Java Class which is available with Java EE 6.
Is it possible that I integrate the standalone JavaEE 6 inside Eclipse IDE without installing any webserver or updating the current one?
You can add a maven dependency for Java EE 6 (http://search.maven.org/#artifactdetails%7Cjavax%7Cjavaee-api%7C6.0%7Cjar) to your project, and eclipse will gladly understand it.
However, your runtime will also need to be a Java EE 6 compliant container. Otherwise, you'd simply be looking for trouble. You may run into problems at runtime if you use a pre-Java EE 6 container (especially if you use newer features -- such as CDI).
Alternatively, if your library wants a specific feature (like, as I dare to guess, the CDI api), then you can add just the CDI jars to your classpath (check http://search.maven.org/#artifactdetails%7Cjavax.inject%7Cjavax.inject%7C1%7Cjar)
I was using java 6 SE, but now, when i used wsdl2java, it generated class using javax.xml.ws.Service in EE version, so i have downloaded and installed java 6 EE, but i'm not sure where should i change java version from SE to EE in my portlet project.
I have installed few tomcats and glassfishes servers, including one downloaded from oracle website as "java ee sdk" package (http://www.oracle.com/technetwork/java/javaee/downloads/java-ee-sdk-6u3-downloads-439814.html). Still i have no idea where I can locate jre that uses EE api instead of SE api. I googled that there should be directory glassfish3/jdk, but there is nothing like this.
Only JREs i can find are java 6 and 7 SE.
Finally found out how to do that. First, you need to download java EE API (empty signatures, without method code bodies) packed as jar. It can be downloaded from maven central repo.
http://search.maven.org/ + javaee.api gives result of http://search.maven.org/remotecontent?filepath=javax/javaee-api/6.0/javaee-api-6.0.jar (i'm using jre 6).
Now i put that jar into my portlet project. In eclipse its:
project settings -> Java Build Path -> Libraries -> Add External JARs...
Then after java ee api jar is inside of project, you must move it above SE JRE:
project settings -> Java Build Path -> Order and Export
And thats it. You can work with EE API without any errors. Keep on mind that this jar provides ONLY empty API. Such application must be deployed to java EE driven server, most likely you want to deploy it to glassfish (tomcat by default uses SE, not EE, however you can set up tomcat to use EE).
If you need tomcat + EE as me (for sake of liferay IDE that doesn't work well with glassfish), check out that project http://tomee.apache.org/downloads.html
Note: I didnt used it yet so i cannot confirm if it works fine with liferay and liferay IDE.
I have Eclipse Indigo for Java SE and I have Tomcat in Ubuntu. I would like to develop a Java EE application, using Servlet and JSP.
My Eclipse doesn't include Java EE support. Can I add this somehow? If yes, any extra tool or plugin I need to install or download?
Yes. You'll need to use a server like Tomcat to run your application anyway. (Which you have already.) It comes with <tomcat install>/lib/servlet-api.jar. Just include this in your classpath when developing so the code compiles.
Since Tomcat doesn't support the full Java EE spec, it only gives you the Servlet APIs. But that is enough for what you are doing.
I am just starting with Java EE6. i have installed netbeans 7.2 though the sample applications based on java EE6 runs successfully. My question is do i still need to install Java EE6 SDK?? if not, then why is that Java EE6 SDK comes separately???
No you don't need it.
Java EE SDK is available as a standalone package because SUN's philosophy was not to require any specific environment (IDE) to do Java development.
I'm using Eclipse 3.7 classic and I need to do Java EE development.
How can I start development in eclipse 3.7 itself? A different version of Eclipse is available for Java EE development, but is it possible to use the 3.7 version itself?
From where can I get add-on plugins to do the Java EE development and web page creation?
You can accomplish this by going to update sites for all the add-ons and plug-ins that you'd like. The Eclipse for Java EE download is still 3.7 Indigo. It just already has the typical suite of plugins for Java EE development installed.
http://www.eclipse.org/downloads/
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr2