I'm trying to create a recipe for libusb4Java ( https://github.com/usb4java/libusb4java/). I have the following recipe SUMMARY = "Native library support for usb4java" HOMEPAGE = "http://usb4java.org" BUGTRACKER = "https://github.com/usb4java/libusb4java/issues" SECTION = "libs" DEPENDS = "libusb" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.md;md5=4c49d7fe1fc7a6ebad3b4e6b849a0052" BBCLASSEXTEND = "native nativesdk" SRCREV = "396d642a57678a0d9663b062c980fe100cc0ea1e" SRC_URI = "git://github.com/usb4java/libusb4java.git" S = "${WORKDIR}/git" #need to change following ref http://usb4java.org/nativelibs.html D = "/tmp" export JAVA_HOME="${STAGING_DIR_NATIVE}/usr/bin/java" inherit cmake java-library local.conf has the following added: BB_ENV_EXTRAWHITE += "JAVA_HOME" I get the following error: checking if /home/ubuntu/yocto/poky/build/tmp/work/x86_64-linux/classpath-native/0.99-r6.0/recipe-sysroot-native/usr/bin/ecj-initial works... configure: error: The Java compiler /home/ubuntu/yocto/poky/build/tmp/work/x86_64-linux/classpath-native/0.99-r6.0/recipe-sysroot-native/usr/bin/ecj-initial failed (see config.log, check the CLASSPATH?) So I appear to have a classpath problem, but I'm unsure how to resolve this? Any advice appreciated.