86

What is the difference between com.sun.jersey and org.glassfish.jersey?

Currently I have my REST service working on com.sun.jersey and I want to write tests, but I can't find a good tutorial for this (nothing seems to work). However, I can find good documentation about the org.glassfish.jersey tests.

Daniel Olszewski
  • 13,995
  • 6
  • 58
  • 65
user1226868
  • 1,708
  • 5
  • 18
  • 29

1 Answers1

115

The only difference between com.sun.jersey and org.glassfish.jersey is that the package name was changed because Jersey team is now part of another organization (Glassfish). Versions below 2 use package com.sun.jersey, versions above 2 use org.glassfish.jersey. And yes, there are some differences between 1.x and 2.x.

assylias
  • 321,522
  • 82
  • 660
  • 783
michal
  • 1,796
  • 1
  • 13
  • 11
  • 1
    Tip: This version divide can also be seen a Maven Central Repository: http://search.maven.org/#search%7Cga%7C1%7Cjersey-server – kevinarpe Nov 17 '15 at 07:46
  • 1
    Jersey 2.0 provides support for Java SE HTTP Server, Grizzly 2 HTTP server, Servlet 2.5 or higher containers as well as OSGi containers on the server side and HTTPURLConnection-based or Grizzly asynchronous client transport connectors. To leverage JAX-RS/Jersey server-side async features in a Servlet container, you need a container that supports Servlet 3.0 at least. Jersey supports asynchronous resource invocations on Grizzly 2 HTTP server too. (Ref - http://marek.potociar.net/2013/06/13/jax-rs-2-0-and-jersey-2-0-released/) – Mahesh Jun 24 '17 at 04:37
  • 6
    For me the big difference is that com.sun.jersey works and org.glassfish.jersey doesn't. lol – Pavel Feb 16 '18 at 12:09