在 Emacs 中使用 JDE,我想要类似 Eclipse 的运行配置

发布于 2024-07-16 14:03:06 字数 441 浏览 2 评论 0原文

我正在使用 JDE 编写一个更大的项目。 来自 Eclipse,我怀念运行配置。 基本上,我想在项目中启动几个不同的类。 其中一些是小程序,一些是带有 main 方法的常规类。 我还希望能够为它们指定不同的运行时参数。

基本上是这样的:

run_config_1
  applet: false
  main class: package1.subpackage1.ClassX
  arguments: arg1 arg2

run_config_2
  applet: true
  main class: package1.subpackage1.AppletClassX
  arguments:

etc ...

然后我可以动态切换配置,测试项目的不同部分。 那么JDE有类似的东西吗? 还是我必须自己写? 如果是这样的话,我想要一些关于我应该采取的总体方向的指示。

I'm using JDE for writing a larger project. Coming from Eclipse, i miss the run configurations. Basically, there are several different classes in the project that i would like to launch. Some of them are applets, some of the are regular classes with a main method. I would also like to be able to specify different run time arguments to them.

Basically, something like this:


run_config_1
  applet: false
  main class: package1.subpackage1.ClassX
  arguments: arg1 arg2

run_config_2
  applet: true
  main class: package1.subpackage1.AppletClassX
  arguments:

etc ...

Then I could switch configuration on the fly, testing different parts of the project. So is there something like this for JDE? Or do I have to write it myself? If that is the case, I would like some pointers on the general direction I should take.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

寻找我们的幸福 2024-07-23 14:03:06

您是否查看过 JDE 中已有的功能? 例如,“运行 Java 应用程序”位于 http://jdee.sunsite .dk/jdedoc/html/jde-ug/jde-ug.html

Have you looked at what is already available in JDE? E.g. "Running Java Applications" at http://jdee.sunsite.dk/jdedoc/html/jde-ug/jde-ug.html ?

玩世 2024-07-23 14:03:06

您确实可以切换配置:为此使用“项目文件”。 在项目文件中可以记录当前的 JDE 设置。 您可以根据自己的喜好设置 java 编译和运行的参数。 从jde-create-new-project开始。 您需要为每个配置(=项目文件)设置新目录。

这里是生成的示例项目文件

(jde-project-file-version "1.0")
(jde-set-variables
 '(jde-project-name "mysample")
 '(jde-run-option-application-args (quote ("-v" "mydir")))
 '(jde-run-read-app-args t))

you can switch configrations indeed: use the "project files" for this. in a project file your current JDE settings can be recorded. you can set the arguments for java compile and run to your liking. start with jde-create-new-project. you need to set up new directories for each configuration (=project file).

here a generated sample project file

(jde-project-file-version "1.0")
(jde-set-variables
 '(jde-project-name "mysample")
 '(jde-run-option-application-args (quote ("-v" "mydir")))
 '(jde-run-read-app-args t))
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文