I've been able to completely compile Pi4J using Netbeans 8.0.2 on Windows XP, Home Edition, SP3.
There's one package, however, that keeps on indicating that there are issues: Activator.java in the package com.pi4j.service.osgi.
I've taken a screen shot of it, pls. find it below:
This is a contradictionary situation, which I can't explain (Maven is anyhow new to me and I've not been able so far to run the Maven command line commands, as explained in the Pi4J package...).
@Override
public void start(BundleContext bundleContext) throws Exception
{
// create a new GPIO service instance
// and register services with OSGi
bundleContext.registerService(GpioService.class.getName(), new GpioServiceImpl(), null);
bundleContext.registerService(SystemInformationService.class.getName(), new SystemInformationServiceImpl(), null);
bundleContext.registerService(NetworkInformationService.class.getName(), new NetworkInformationServiceImpl(), null);
}