Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

308
Vistas
How to use Java EE and Jakarta EE together?

Is it at all possible to use older Jave EE libraries (with javax imports) in a new Jakarta EE system (with jakarta imports)?

All the APIs would be backwards compatible if it weren't for the trademark issue. Is there any runtime library or build tool available that can get them to work together? Is the only solution to fork old libraries and updated them manually?

I'm in particular looking at the servlet API, but validation, persistence, and mail may bite me too.

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

You can use the Eclipse Transformer project to transform your older Java EE compatible jar with javax.* imports to a jar using jakarta.* imports.

The transformer takes care of some additional things like renaming constants in configuration files and such. It'a a work in progress, but does the job quite well already.

over 4 years ago · Santiago Trujillo Denunciar

0

Like you mention, the APIs are compatible except for the trademark changes, so one solution is to build wrappers around them that delegate from the new library to the old. Might not always be straightforward, but depending on your use case, it could work.

For example:

public class LegacyServlet implements jakarta.servlet.Servlet {
 
  private final javax.servlet.Servlet delegate;
 
  public LegacyServlet(javax.servlet.Servlet delegate) {
    this.delegate = delegate;
  }
 
  @Override
  public void service(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse resp) {
    delegate.service(new LegacyServletRequest(req), new LegacyServletResponse(resp));
  }
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda