How to compile Java source (.java) with Jar library and put classes (.class) in another folder with javac.exe? I would like to compile all Java classes form folder C:\Users\Kamil Szmit\Documents\NetBeansProjects\Warehouse\src\war ehouse (Category.java, Controller.java, Customers.java, Manufacturers.java, Model.java, Products.java, Startup.java, Subcategories.java, Transactions.java, View.java), add C:\Users\Kamil Szmit\Documents\NetBeansProjects\Warehouse\src\ojd bc6.jar as compile-time library and put classes (.class) in folder C:\Users\Kamil Szmit\Documents\NetBeansProjects\Warehouse\build\c lasses\warehouse.