In NetBeans we can set a project to be a Main Project. We can use shortcut keys to run or debug a main project even if we are working on another project. To unset the Main Project we must go to Run | Set Main Project | None.