Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse 2020-12 issues with javax packages(Eclipse 2020-12 has issues with import javax packages)
Eclipse 2020-12 issues with javax packages [message #1836190] Wed, 23 December 2020 16:17 Go to next message
Eduardo Moreira is currently offline Eduardo MoreiraFriend
Messages: 2
Registered: December 2020
Junior Member
I updated my Eclipse to 2020-12 and after it my workspace projects has "erros" to import javax packages.

I've a custom Target Plataform with jakarta.xml.bind-api_2.3.2.jar library included. Then to use it, I imported the package javax.xml.bind on MANIFEST.MF without version:
Import-Package: javax.xml.bind,

My java code import it and it always works fine:
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;

But, after updated to 2020-12, the imports has an error:

The import javax.xml.bind cannot be resolved

If I change my package dependecy to:

The java import works again.

I've the same problem with others javax packages...

I've 50 bundles that this problem and change each bundles is a bad way to me. This product is in Production Env to 3 years and change each bundle wiil be require a lot of tests.

How I solved it without specifique a version of javax packages on manifest?
Re: Eclipse 2020-12 issues with javax packages [message #1836197 is a reply to message #1836190] Wed, 23 December 2020 20:33 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7382
Registered: July 2009
Senior Member

This has been a mega-pain ever since Java became totally unstable with the introduction of modules in Java 9 and now made even worse by the effective removal of Eclipse support for the not-EOL Java 8.

See in which I wrote

The recent "Errors when running 2018-12 RC2 on Java 11" thread is just one of many 'new'-Java problems.

The instability of Java is clearly a major PITA, so that each of Java 8, 9, 10, 11 has resulted in significant breakages that have gradually been ameliorated.

As a user I see Eclipse as a nice platform that has for many years hidden the Windows/Linux/MacOS eccentricities. Less obviously, the platform now needs to hide the Java 7/8/9/10/11 eccentricities, so that for the most part an Eclipse application just works. We should not depend on each project rebuilding with latest-Java workarounds.

Currently each new Java eccentricity seems to be accommodated by dubious workarounds that do not hide the problem from the user. e.g. I now have to import javax.annotation into each of my test plugins.

It seems that we need to offer two options.

a) a default Eclipse that maximally hides the Java eccentricities to give a good user experience. This may require a 're-modularizer' to counteract Java's incessant migrations.

b) -strict Eclipse for those who want to be precisely in tune with a Java eccentricity.

This obvservation/suggestion seemed well received in principle, but there is always the problem of resources/funding, so Eclipse prefers to require each user/developer to discover/diagnose/accommodate each new Java instability.

In the case of your 50 changes, I suggest introducing a common dependency that acquires javax etc so that next time you only need to make a change in one place.


Ed Willink
Re: Eclipse 2020-12 issues with javax packages [message #1836439 is a reply to message #1836197] Mon, 04 January 2021 12:09 Go to previous message
Eduardo Moreira is currently offline Eduardo MoreiraFriend
Messages: 2
Registered: December 2020
Junior Member
Thanks for your repply.
I'm thinking into your suggestion.
I'm also following some topics on bugzilla:
Previous Topic:Help Tab - Do Not Follow
Next Topic:Old Eclipse Versions - Broken Downloads?
Goto Forum:

Current Time: Thu Jan 27 09:31:57 GMT 2022

Powered by FUDForum. Page generated in 0.02389 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top