gpt4 book ai didi

java - 我们可以在eclipse中从我们的项目中调用另一个项目java类吗

转载 作者:IT老高 更新时间:2023-10-28 20:52:09 27 4
gpt4 key购买 nike

import ...

public class TriggerJob {

String jobStatus = "";
SchedulerMetaData metaData = null;

public void rightNow(HashMap ParamMap) {
AnotherProjectClass anp = new AnotherProjectClass();
anp.display();
}

}

最佳答案

你可以这样做:

In the dependency you can add the other projects to your project. Right click on project -> properties -> java build path -> projects. Add your project here.

Make the classes of project into jar and add it to other project

依赖应该添加到类路径中

In run time, make sure the JAR files of the referenced projects is added in class path on both the cases.

关于java - 我们可以在eclipse中从我们的项目中调用另一个项目java类吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21255265/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com