Setting the CLASS_PATH on the command line will not affect anything - NetBeans uses its own classloader system to find classes from modules.

So what you need is for your libraries to be a module - see the section on wrapper modules.

Source: NetBeans FAQ