简体   繁体   English

通过Netbeans中的“运行文件”运行Java程序时,如何设置-DmyConfig =任何值?

[英]How do I set -DmyConfig=whatever when running a java program through “run file” in Netbeans?

I'm using netbeans 6.7.1 and I have a maven web project (war file). 我正在使用netbeans 6.7.1,并且有一个Maven Web项目(war文件)。

I'd like to profile part of the project by running a java class with a main method. 我想通过使用main方法运行java类来分析项目的一部分。 I need to specify a -DconfigDir=whatever when running this program. 运行此程序时,我需要指定-DconfigDir = whatever。

How do you specify this in netbeans? 您如何在netbeans中指定呢?

In eclipse I simply edit the run configurations. 在eclipse中,我只需编辑运行配置。 I've only seen where you can setup run configurations for "jar" projects, not "war" projects. 我只看到可以在其中为“ jar”项目而不是“ war”项目设置运行配置的地方。

It looks like you can do this in NetBeans 6.9. 看起来您可以在NetBeans 6.9中执行此操作。 替代文字

暂无
暂无

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

相关问题 我的Java程序在netbeans中运行,但不会在命令中或通过jar文件运行。 我究竟做错了什么? - My java program runs in netbeans, but will not run in command or through the jar file. What am I doing wrong? 如何通过控制台(命令提示符)运行 java 程序? - How do I run a java program through the console (command prompt)? 我在netbeans中运行了以下程序,构建成功,但是当我运行java文件时,出现以下异常: - I have run the following program in netbeans, the build was successful but when I run the java file I get the following exception: 如何以独立于平台的方式在 netbeans 中的 Java 框架内运行外部程序? - How do I run an external program inside a Java frame in netbeans in a platform independent manner? 在Netbeans / Java Swing下,如何以GTK +外观运行程序? - Under Netbeans/Java Swing, how do I run the program as GTK+ Look and Feel? 如何通过bat文件运行JAVA程序 - How to run JAVA program through bat file jboss的run.bat文件未通过Java程序运行 - jboss run.bat file is not running through java program 如何在Java程序中获取并运行jar文件? - How do I get and run a jar file within a Java program? 当我按Ctrl + F6来运行Java文件时,netbeans IDE会做什么? - What will netbeans IDE do when I press Ctrl+F6 to run a java file? 当我从Netbeans运行JFrame程序时,印地语字体是可见的,但运行.jar文件时,则看不见 - Hindi font is visible when I am running JFrame program from Netbeans but not visible when running .jar file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM