简体   繁体   English

在 JDeveloper 中,如何指定要使用哪个类的“main”?

[英]In JDeveloper, how do I specify which class's 'main' to use?

When I first set up my JDev project, it used the main method from the first class I had created - so when I hit run, it would use that as the starting point.当我第一次设置我的 JDev 项目时,它使用了我创建的第一个类中的 main 方法——所以当我点击运行时,它会使用它作为起点。

I then imported my project onto another computer, including a dozen classes, and when I first hit 'run', JDeveloper asked me which 'main' to start from - but I clicked on the wrong one.然后我将我的项目导入到另一台计算机上,包括十几个类,当我第一次点击“运行”时,JDeveloper 询问我从哪个“主”开始 - 但我点击了错误的。 At the time I just left it, but I now can't find out how to specify the other class as the correct 'starting point'.当时我刚刚离开它,但我现在不知道如何将另一个类指定为正确的“起点”。

Specifically, I want to do this from within JDeveloper so it works when I hit 'run' on the IDE, I don't want to specify it in the command window when running it, etc.具体来说,我想在 JDeveloper 中执行此操作,因此当我在 IDE 上点击“运行”时它可以工作,我不想在运行它时在命令窗口中指定它,等等。

You can define Jdeveloper run target as follow :您可以按如下方式定义 Jdeveloper 运行目标:

  • Run > Choose active Run configuration > Manage Run configuration运行 > 选择活动运行配置 > 管理运行配置

  • Edit Default run configuration > Browse > Choose your Default run target编辑默认运行配置 > 浏览 > 选择您的默认运行目标

在此处输入图片说明

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

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