Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between javaee-api and javaee-web-api?

Tags:

java

api

I realise these dependencies are required for compiling against Java servlet specification, and so on, but I'm not clear on the differences between them, and when I should use one as opposed to the other.

What is the difference between them? Is one a superset of the other?

<dependency>   <groupId>javax</groupId>   <artifactId>javaee-api</artifactId>   <version>6.0</version>   <scope>provided</scope> </dependency>  dependency>   <groupId>javax</groupId>   <artifactId>javaee-web-api</artifactId>   <version>6.0</version>   <scope>provided</scope> </dependency> 
like image 344
kevin847 Avatar asked May 28 '13 09:05

kevin847


People also ask

What is Javaee Web API?

The Java Message Service (JMS) API is a messaging standard that allows Java EE application components to create, send, receive, and read messages. It enables distributed communication that is loosely coupled, reliable, and asynchronous. The Java EE 8 platform requires JMS 2.0.

Which of the following Apis is part of the Java EE 7 specification?

The Java EE 7 platform requires Java Persistence API 2.1.

Which edition of Java defines a set of APIS?

The Java API is the set of classes included with the Java Development Environment. These classes are written using the Java language and run on the JVM. The Java API includes everything from collection classes to GUI classes. You can view a complete listing of the Java API at: "Java 2 Platform, Standard Edition, v 1.3.


1 Answers

The javaee-web-api is supposed to support the Java EE Web Profile.

Introduced in Java EE 6, the Web Profile radically streamlines the platform and enables the creation of a new dawn of lightweight, agile, compelling application servers with a laser focus on web application development.

However if you compare the two different jar files there is little that differs between them. I opened them up in 7-zip and these two screenshots shows the only (AFAIK) differences, namely that there is no support for JMS in the javaee-web-api and that the xml library seems to be larger in the javaee-api.

javaee-api

enter image description here

javaee-web-api

enter image description here

like image 50
maba Avatar answered Sep 22 '22 00:09

maba