-->

Eclipse Mars : The configured runtime is insuffici

2019-04-23 09:06发布

问题:

Eclipse version : Mars. JDK 1.8.

I want to create a JAXB project. In the JAXB Facet page, there is the following error:

The configured runtime is insufficient to provide an implementation for JAXB2.2

Could you give me some suggestions on how I can fix it?

回答1:

I faced the same problem. Below fix worked for me.

     1) Select File->New ->Project
     2) Choose JAXB Project from JAXB and click Next
     3) Give Project Name and click Next
     4) On the next window, just Click Next
     5) On the next window (titled JAXB Facets), Choose "User Library" for JAXB implementation. 
        Click "Download Library.." picture and choose EclipseLink 2.5.2 
        (or the higher version shown in the window) and click Next
        This will install the library (make sure your are connected to internet.)


回答2:

This is an issue with JDK8 in Eclipse, when you try creating a Generic JAXB2.2 project.

For fixing the issue in Eclipse Mars, do the following: While creating the project, select your Target Runtime as JDK7 and that will fix it. I have tried it myself, and it has worked fine!

If you want to continue to use JDK8, in the last screen of project creation, in JAXB implementation type, select "Disable Library Configuration" instead of JRE. This will remove the error and let you create the project. But I would suggest don't go for this as this may introduce more error in the future.

To use JDK8 in Eclipse Luna, a patch has been published to fix this issue. You can check it here: configure Generic JAXB 2.2 Platform with Java 1.8. I haven't tried it myself, but from the comments it seems the issue is resolved.



回答3:

Here is what that worked for me (Eclipse Luna Service Release 2 (4.4.2)). In the third screen "JaxB Facet", in the JaxB Project wizard, select "User Library" as JaxB Implementation. Then click on "Manage Libraries" to create a new library with rt.jar from jdk/jre/lib folder. Now there is no error message, and the "Finish" button in the wizard is now active !



回答4:

I solved it like this (Eclipse Oxygen with jdk8):

  1. File/New/Project/JAXB/JAXB Project
  2. Next
  3. Give the name of the project
  4. Target Runtime: jdk8
  5. JAXB version: 2.2
  6. Next, Next
  7. Platform: Generic JAXB 2.2.
  8. JAXB Implementation Type: Disable Library Configuration.
  9. Finish.

This works.



回答5:

This is related to jdk version problem. I faced same error just we need to change jdk version from jdk1.8 to jdk1.7, to do this follow below steps... open eclipse-->select run--->Run Configrations..-->double click on java application--->select JRE--->select radio button Altenate JRE then click on installed JRE's ---> now you can remove jdk1.8 and add jdk1.7

enter image description here