Can we call another project java class from our project in eclipse

前端 未结 9 1590
心在旅途
心在旅途 2020-11-30 07:40
import ...

public class TriggerJob {

    String jobStatus = \"\";
    SchedulerMetaData metaData = null;

    public void rightNow(HashMap ParamMap){ 

AnotherProj         


        
9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 08:06

    Yes. In the Project Explorer right click on it and select Properties, there go to Java Build Path and select Projects tab. Add your other project here, now you're able to use the classes from it in your current project. But note BOTH have to be open when you run them or debug in eclipse (otherwise you will see red lines telling you a class was not found).

提交回复
热议问题