6

当我在 eclipse indigo 中创建一个 jaxb 项目时,它告诉我“当前选择的 JAXB 库提供程序无效”,即 eclipselink2.3.0-Indigo 我尝试了 javanet 下载 jar,但没有成功。我可以尝试此处描述的演示中的示例: http : //wiki.eclipse.org/EclipseLink/Examples/MOXy/GettingStarted,但 MOXy 自定义部分除外。当我运行时没有错误,它似乎没有做任何事情。

我错过了什么。提前致谢。卡迈勒

4

1 回答 1

8

Background Info

The Eclipse Indigo release offers some new JAXB tooling from the Dali project (which is part of Web Tools Platform). You are now able to create a JAXB Project.

Configuration

A JAXB project can be configured to use the reference or EclipseLink MOXy implementation of JAXB. This can be done via:

  1. Right click your JAXB Project
  2. Select Properties
  3. Select Project Facets
  4. Check the JAXB facet (If you are using Java SE 6 set the JAXB version to 2.1, if you are using Java SE 7 then set the JAXB version to 2.2).
  5. Click the "Further configuration required" or "Further configuration available" links.

Using the JAXB RI

  • Choose Generic JAXB as your platform
  • Choose JRE as your JAXB Implementation Type

Using EclipseLink JAXB (MOXy)

  • Choose EclipseLink JAXB as your platform
  • Choose User Library as your JAXB Implementation
  • Click the Manage Libraries... icon
  • Add a new User Library for EclipseLink (the binary can be obtained from http://www.eclipse.org/eclipselink/downloads/).

于 2011-08-12T20:32:49.497 回答