Set up classpath in Eclipse

On Eclipse main window

Right click on .java file-> Run As -> Run Configurations...

On Run Configurations window

Java Application -> java programe -> classpath -> User Entries -> Advanced... 

On Advanced Options 

select Add Folders -> OK -> select the target folder -> OK 

原文地址:https://www.cnblogs.com/TonyYPZhang/p/7668988.html