Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I download the latest Java EE jars without installing GlassFish?

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.

like image 203
C. Ross Avatar asked Jan 26 '12 14:01

C. Ross


2 Answers

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.

like image 187
tobiasbayer Avatar answered Oct 16 '22 12:10

tobiasbayer


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?

like image 37
Sled Avatar answered Oct 16 '22 11:10

Sled