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.

1 Answer 1

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.

3
  • 1
    Tip: This version divide can also be seen a Maven Central Repository: search.maven.org/#search%7Cga%7C1%7Cjersey-server
    – kevinarpe
    Nov 17, 2015 at 7: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 - marek.potociar.net/2013/06/13/…)
    – Mahesh
    Jun 24, 2017 at 4:37
  • 7
    For me the big difference is that com.sun.jersey works and org.glassfish.jersey doesn't. lol
    – Pavel
    Feb 16, 2018 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.