---
title: "cxf做客户端时，报 javax.xml.bind.JAXBException: \"\" doesnt contain ObjectFactory.class"
author: "lost_alien"
date: "2011-09-19T17:58:05Z"
tags: []
categories: ["编程语言"]
slug: "cxf-javax-xml-bind-jaxbexception-doesnt-contain-objectfactory-class"
draft: false
lastmod: "2011-09-19T17:58:05Z"
id: 1175322
url: "https://lost-alien.iteye.com/blog/1175322"
---

整个异常信息中，还有个错误提示：
 IOException during exec() of compiler "javac". Check your path environment variable.

在网上查了查，是这个原因：
“CXF tools need javac to compile the generated source files.
Please add the javac&apos;s directory into the PATH environment variable.”


原来，我在环境变量里只设置了 java_home，没在path里面加上 %java_home%\bin....