11

I need to get the latest Java EE jars, but I don't need GlassFish on my computer. On the Oracle Download Site I see versions of the install with and without JDK, but none without GlassFish.

When running the installer's advanced install I see an option to skip configuring GlassFish, but not to skip installing it.

How can I just get the Java EE jars? By Java EE jars I mean the modularized jars that contain the Java EE functionality (javax.*), such as mail.jar.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
C. Ross
  • 31,137
  • 42
  • 147
  • 238
  • You can surely get whatever you need via Maven, there are no "j2ee jars", they've long since been modularized. – TC1 Jan 26 '12 at 14:38
  • @Tichodroma [J2EE.jar](http://www.jarfinder.com/index.php/jars/versionInfo/64), [mail.jar](http://www.jarfinder.com/index.php/jars/versionInfo/44), etc, etc – C. Ross Jan 26 '12 at 14:38
  • @TC1 Unfortunately we're not a Maven shop, but yes the modularized jars is what I'm looking for. Preferably getting the whole set in one go. – C. Ross Jan 26 '12 at 14:39
  • What exactly do you need it for? If it is to fix compilation errors on Java EE API in your IDE, please read http://stackoverflow.com/questions/4076601/how-do-i-import-the-javax-servlet-api-in-my-eclipse-project Glassfish **is** a Java EE implementation. Others are Tomcat, JBoss AS, WebSphere AS, WebLogic, etc. – BalusC Jan 26 '12 at 14:40
  • As per your update, JavaMail can be downloaded separately from http://www.oracle.com/technetwork/java/javamail/index-138643.html – BalusC Jan 26 '12 at 14:46

2 Answers2

13

I assume you want the Java EE 6 API jar so you can write EJB 3.1 applications and such.

If you are using Maven, add

<dependency>
  <groupId>javax</groupId>
  <artifactId>javaee-api</artifactId>
  <version>6.0</version>
  <scope>provided</scope>
</dependency>

to your pom.xml.

Without Maven, you can download the jar from the repository.

tobiasbayer
  • 10,269
  • 4
  • 46
  • 64
2

You can get the jars one at a time. I recommend using Jarvana to find what jars given files come from and then just search for the jar and you'll find the site. It's not pretty, but frankly I've not seen a better way... even with Maven really.(Jarvana is down since August 2013)

Although, with Maven you should use Mvn Repository to search for the dependency you need.

If you are not using Maven, have you looked at Apache Ivy? It integrates with Ant nicely and will the dependency resolution just like Maven does.

You do realise though, that these jars are just of interfaces, and the the implementations of the are provided by the Java EE containers (e.g. Glassfish, JBoss, WebSphere etc) right?

Sled
  • 18,541
  • 27
  • 119
  • 168