简体   繁体   English

jar eclipse 启动配置 - 它是什么意思以及如何在我的示例中使用它?

[英]jar eclipse launch configuration - what does it mean and how do i use it in my example?

I have two projects P1 and P2.我有两个项目 P1 和 P2。 P2 depends on P1 and both have their own main. P2 依赖于 P1,两者都有自己的主要内容。 I am trying to convert both into JARS.我正在尝试将两者都转换为 JARS。

When I try to make P1 into a JAR, i see a dialog box with "launch configuration" field in it.当我尝试将 P1 制作成 JAR 时,我看到一个带有“启动配置”字段的对话框。 I don't know what this does.我不知道这是做什么的。 I entered P1 into it and the jar was ready.我将 P1 输入其中,罐子就准备好了。 Did I get this correctly ?我是否正确理解?

I also want to make a jar out of P2.我也想用P2做一个罐子。 What do i enter in the launch config for that ?我在启动配置中输入什么?

Launch configuration : Select a 'Java Application' launch configuration to use to create a runnable JAR.启动配置:选择“Java 应用程序”启动配置以用于创建可运行的 JAR。

If you have already " Run " or Set the run configuration of this project in Eclipse, you can find the according launch configuration in this drop down list of Launch configuration .如果您已经在 Eclipse 中“运行”或设置了该项目的运行配置,您可以在Launch configuration 的这个下拉列表中找到相应的启动配置

在此处输入图片说明

Thus, what you need to do is to speificy the correct configuration for the correct jar.因此,您需要做的是为正确的 jar 指定正确的配置。 The one starts with P1 main method for P1, the other starts with P2 main method for P2.一个从 P1 的主方法开始用于 P1,另一个从 P2 的主方法开始用于 P2。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM