NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
tomzi
Joined: 19 Aug 2008 Posts: 4
|
Posted: Thu Aug 25, 2011 8:15 am Post subject: How to add Maven System Properties to 'Run File' Command line |
|
|
Normally with running a java Main Class I add System properties like this:
java -Darg1=Hi -Darg2=5 MyClass
However in NB I have no clue how to do that
.) I created a 'Run' Configuration
.) I added my system properties to the 'Run file via main()' under Actions like:
exec.args=-classpath %classpath ${packageClassName} -Darg1=Hi
but my little test program:
public class App
{
public static void main( String[] args )
{
System.out.println( "arg1=" + System.getProperty("arg1"));
}
}
would show 'arg1=null'
Any idea? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|