1

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.

Fisher
  • 1,712
  • 1
  • 19
  • 38

1 Answers1

1

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.

Fisher
  • 1,712
  • 1
  • 19
  • 38